Skip to content

HiDeoo/stylelint-formatter-yasf

Repository files navigation

stylelint-formatter-yasf Build Status Coverage Status

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.

Screenshot

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
const styleLintPlugin = require('stylelint-webpack-plugin');
const stylelintFormatter = require('stylelint-formatter-yasf');

module.exports = {
  // ...
  plugins: [
    new styleLintPlugin({
      formatter: stylelintFormatter,
    }),
  ],
  // ...
}
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.

Releases

No releases published

Packages

No packages published