0.1.3 • Published 4 years ago

robins-rollup-plugin-eslint v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

robins-rollup-plugin-eslint

latest version on npm npm downloads a month required node version dependency status eslint dependency rollup peer dependency package license

Lint your Rollup bundles with ESLint. 🐝

Nicely integrates the most recent version of eslint into a rollup plugin.

How

yarn add robins-rollup-plugin-eslint --dev
import eslint from 'robins-rollup-plugin-eslint';
// ...

export default {
  // ..
  plugins: [
    eslint()
    // ..
  ]
};

Config

This plugin respects your ESLint configuration as per default. Apart from that, it can take two configuration objects. The first one is intended for the ESLint constructor and gets right passed through, the second one can contain include and exclude patterns for Rollup's filter plugin. You can check out all the possible values by visiting the links in this paragraph.

import eslint from 'robins-rollup-plugin-eslint';
// ...

const development = process.env.ROLLUP_WATCH === 'true';
// ...

export default {
  // ..
  plugins: [
    eslint({
      fix: development
    }, {
      exclude: 'src/no-lint/**/*'
    })
    // ..
  ]
};

Why a new plugin?

Because rollup-plugin-eslint seems to be dead and I got frustrated waiting for a bugfix.

License

MIT