UNPKG

1.32 kBMarkdownView Raw
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
14npm i rollup-plugin-eslint -D
15```
16
17
18## Usage
19
20```js
21import { rollup } from 'rollup';
22import eslint from 'rollup-plugin-eslint';
23
24rollup({
25 entry: 'main.js',
26 plugins: [
27 eslint({ /* your options */ })
28 ]
29});
30```
31
32
33## Options
34
35See more options here [eslint-config].
36
37### throwError
38
39Type: `boolean`
40Default: `false`
41
42If true, will throw an error if any warnings or errors were found.
43
44### include
45
46Type: `array` or `string`
47Default: `[]`
48
49A single file, or array of files, to include when linting.
50
51### exclude
52
53Type: `array` or `string`
54Default: `node_modules/**`
55
56A single file, or array of files, to exclude when linting.
57
58### formatter
59
60Type: `function` or `string`
61Default: `stylish`
62
63Custom error formatter or the name of a built-in formatter.
64
65
66# License
67
68MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)