stylelint-formatter-table
v1.0.4
Published
stylelint-formatter-table
Downloads
903
Readme
stylelint-formatter-table
A table formatter for Stylelint
Install
Using yarn:
$ yarn add stylelint-formatter-table --dev
Using npm:
$ npm i stylelint-formatter-table -D
Usage
Stylelint CLI
$ stylelint file.css --custom-formatter=node_modules/stylelint-formatter-table
Webpack
const styleLintPlugin = require('stylelint-webpack-plugin');
const stylelintFormatter = require('stylelint-formatter-table');
module.exports = {
// ...
plugins: [
new styleLintPlugin({
formatter: stylelintFormatter
}),
],
// ...
}
gulp-stylelint
const gulp = require('gulp');
const stylelint = require('gulp-stylelint');
const stylelintFormatter = require('stylelint-formatter-table');
gulp.task('lint', () =>
gulp.src('file.css')
.pipe(stylelint({
reporters: [ {
formatter: stylelintFormatter,
console: true
} ]
}));
);
grunt-stylelint
const stylelintFormatter = require('stylelint-formatter-table');
grunt.initConfig({
stylelint: {
options: {
formatter: stylelintFormatter
},
all: ['css/**/*.css']
}
});
grunt.loadNpmTasks('grunt-stylelint');
grunt.registerTask('default', ['stylelint']);