0.0.1 • Published 6 years ago

stylelint-formatter-yasf v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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

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.