A pretty formatter for Stylelint
Using npm:
npm install --save-dev stylelint-formatter-pretty
Using yarn:
yarn add stylelint-formatter-pretty --dev
stylelint file.css --custom-formatter stylelint-formatter-pretty
import stylelintFormatter from 'stylelint-formatter-pretty';
grunt.initConfig({
stylelint: {
options: {
formatter: stylelintFormatter
},
all: ['css/**/*.css']
}
});
grunt.loadNpmTasks('grunt-stylelint');
grunt.registerTask('default', ['stylelint']);
import gulp from 'gulp';
import stylelint from 'gulp-stylelint';
import stylelintFormatter from 'stylelint-formatter-pretty';
gulp.task('lint', () =>
gulp.src('file.css')
.pipe(stylelint({
reporters: [ {
formatter: stylelintFormatter,
console: true
} ]
}));
);
import styleLintPlugin from 'stylelint-webpack-plugin';
import stylelintFormatter from 'stylelint-formatter-pretty';
module.exports = {
// ...
plugins: [
new styleLintPlugin({
formatter: stylelintFormatter
}),
],
// ...
}
In iTerm, Command+Click the filename header to open the file in your editor.
In terminals with support for hyperlinks, Command+Click the rule ID to open its documentation.
- eslint-formatter-pretty – a pretty ESLint formatter
MIT © Sindre Sorhus, Marc Görtz