1 | # rollup-plugin-eslint [![Travis Build Status][travis-img]][travis]
|
2 |
|
3 | [travis-img]: https://travis-ci.org/TrySound/rollup-plugin-eslint.svg
|
4 | [travis]: https://travis-ci.org/TrySound/rollup-plugin-eslint
|
5 | [rollup]: https://github.com/rollup/rollup
|
6 | [eslint-config]: http://eslint.org/docs/developer-guide/nodejs-api#cliengine
|
7 |
|
8 | [Rollup] plugin to verify entry point and all imported files with ESLint.
|
9 |
|
10 |
|
11 | ## Install
|
12 |
|
13 | ```sh
|
14 | npm i rollup-plugin-eslint -D
|
15 | ```
|
16 |
|
17 |
|
18 | ## Usage
|
19 |
|
20 | ```js
|
21 | import { rollup } from 'rollup';
|
22 | import eslint from 'rollup-plugin-eslint';
|
23 |
|
24 | rollup({
|
25 | entry: 'main.js',
|
26 | plugins: [
|
27 | eslint({ /* your options */ })
|
28 | ]
|
29 | });
|
30 | ```
|
31 |
|
32 |
|
33 | ## Options
|
34 |
|
35 | See more options here [eslint-config].
|
36 |
|
37 | ### throwError
|
38 |
|
39 | Type: `boolean`
|
40 | Default: `false`
|
41 |
|
42 | If true, will throw an error if any warnings or errors were found.
|
43 |
|
44 | ### include
|
45 |
|
46 | Type: `array` or `string`
|
47 | Default: `[]`
|
48 |
|
49 | A single file, or array of files, to include when linting.
|
50 |
|
51 | ### exclude
|
52 |
|
53 | Type: `array` or `string`
|
54 | Default: `node_modules/**`
|
55 |
|
56 | A single file, or array of files, to exclude when linting.
|
57 |
|
58 | ### formatter
|
59 |
|
60 | Type: `function` or `string`
|
61 | Default: `stylish`
|
62 |
|
63 | Custom error formatter or the name of a built-in formatter.
|
64 |
|
65 |
|
66 | # License
|
67 |
|
68 | MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)
|