stylelint-formatter-pretty
A pretty Stylelint formatter.
Last updated 2 years ago by dreamseer .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install stylelint-formatter-pretty 
SYNC missed versions from official npm registry.

stylelint-formatter-pretty

A pretty formatter for Stylelint

Test Coverage Status Install size XO code style MIT license

Screenshot

Install

Using npm:

npm install --save-dev stylelint-formatter-pretty

Using yarn:

yarn add stylelint-formatter-pretty --dev

Usage

Stylelint CLI

stylelint file.css --custom-formatter=node_modules/stylelint-formatter-pretty

grunt-stylelint

import stylelintFormatter from 'stylelint-formatter-pretty';

grunt.initConfig({
  stylelint: {
    options: {
      formatter: stylelintFormatter
    },
    all: ['css/**/*.css']
  }
});

grunt.loadNpmTasks('grunt-stylelint');
grunt.registerTask('default', ['stylelint']);

gulp-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
      } ]
    }));
);

Webpack

import styleLintPlugin from 'stylelint-webpack-plugin';
import stylelintFormatter from 'stylelint-formatter-pretty';

module.exports = {
  // ...
  plugins: [
    new styleLintPlugin({
      formatter: stylelintFormatter
    }),
  ],
  // ...
}

Tips

In iTerm, <kbd>Command</kbd>+Click the filename header to open the file in your editor.

In terminals with support for hyperlinks, <kbd>Command</kbd>+Click the rule ID to open its documentation.

Related

License

MIT © Sindre Sorhus, Marc Görtz

Current Tags

  • 4.0.0                                ...           latest (2 years ago)

19 Versions

  • 4.0.0                                ...           2 years ago
  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           5 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.1.4                                ...           6 years ago
  • 1.1.3                                ...           7 years ago
  • 1.1.2                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 18
Last Month 19
Dependencies (6)
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |