New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

stylelint-formatter-pretty

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-formatter-pretty

A pretty Stylelint formatter.


Version published
Weekly downloads
43K
increased by39.28%
Maintainers
1
Weekly downloads
 
Created

stylelint-formatter-pretty Build Status Coverage Status Greenkeeper badge

A pretty formatter for Stylelint

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

const stylelintFormatter = require('stylelint-formatter-pretty');

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

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

gulp-stylelint

const gulp = require('gulp');
const stylelint = require('gulp-stylelint');
const stylelintFormatter = require('stylelint-formatter-pretty');

gulp.task('lint', () =>
  gulp.src('file.css')
    .pipe(stylelint({
      reporters: [ {
        formatter: stylelintFormatter,
        console: true
      } ]
    }));
);

Webpack

const styleLintPlugin = require('stylelint-webpack-plugin');
const stylelintFormatter = require('stylelint-formatter-pretty');

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

Tip

In iTerm, Cmd+Click the filename header to open the file in your editor.

License

MIT © Sindre Sorhus, Marc Görtz

FAQs

Package last updated on 28 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts