stylelint-formatter-yasf
v0.0.1
Published
Yet Another Stylelint Formatter
Downloads
3
Maintainers
Readme
stylelint-formatter-yasf
Yet Another Stylelint Formatter
About
This Stylelint formatter is heavily based on the default string formatter with only some few changes:
- All errors are individually clickable (if your terminal support it).
- Add a summary at the end when encountering errors.
- Modify the default ordering by putting errors before warnings instead of only considering positions.
Installation
Using Yarn:
yarn add --dev stylelint-formatter-yasf
Using npm:
npm install --save-dev stylelint-formatter-yasf
Usage
CLI or npm script
$ stylelint file.css --custom-formatter=node_modules/stylelint-formatter-yasf
Webpack
const styleLintPlugin = require('stylelint-webpack-plugin');
const stylelintFormatter = require('stylelint-formatter-yasf');
module.exports = {
// ...
plugins: [
new styleLintPlugin({
formatter: stylelintFormatter,
}),
],
// ...
}
gulp-stylelint
const gulp = require('gulp');
const stylelint = require('gulp-stylelint');
const stylelintFormatter = require('stylelint-formatter-yasf');
gulp.task('lint', () =>
gulp.src('file.css')
.pipe(stylelint({
reporters: [{
formatter: stylelintFormatter,
console: true
}]
}));
);
License
Licensed under the MIT License, Copyright © HiDeoo.
See LICENSE for more information.