lesshint-extra-webpack-plugin

0.0.2 • Public • Published

Lesshint Plugin for Webpack

npm

Install

$ npm install lesshint-extra-webpack-plugin

Usage

In your webpack configuration:

const LessHintPlugin = require('lesshint-extra-webpack-plugin');
 
module.exports = {
  // ...
  plugins: [
    new LessHintPlugin({
          files: [
              './source/applications/**/*.less',
              '!./vendor/**/*.less'
          ],
          configFile: path.resolve(__dirname, '.lesshintrc')
      })
  ],
  // ...
}

For using additional linters:

const LessHintPlugin = require('lesshint-extra-webpack-plugin');
 
module.exports = {
  // ...
  plugins: [
    new LessHintPlugin({
          files: [
              './source/applications/**/*.less',
              '!./vendor/**/*.less'
          ],
          configFile: path.resolve(__dirname, '.lesshintrc'),
          linters : [
              require('./source/my-awesome-linter')
          ]
      })
  ],
  // ...
}

Options

See lesshint options, for the complete list of options.

  • configFile: The config file location for your lesshint options.
  • files: The glob pattern for finding files.
  • linters: Additional linters to be used by lesshint.
  • reporter: The reporter for lesshint. Default: lesshint-reporter-stylish.
  • failOnError : If webpack build should fail if lesshint reported errors. Default: false.

Package Sidebar

Install

npm i lesshint-extra-webpack-plugin

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • xtephan