UNPKG

824 BMarkdownView Raw
1# eslint-plugin-jquery
2
3Disallow jQuery functions with native equivalents.
4
5## Installation
6
7You'll first need to install [ESLint](http://eslint.org):
8
9```
10$ npm install eslint --save-dev
11```
12
13Next, install `eslint-plugin-jquery`:
14
15```
16$ npm install eslint-plugin-jquery --save-dev
17```
18
19**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-jquery` globally.
20
21## Usage
22
23Add `jquery` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
24
25```json
26{
27 "plugins": [
28 "jquery"
29 ],
30 "rules": {
31 "jquery/no-each": 2,
32 "jquery/no-map": 2,
33 "jquery/no-trim": 2,
34 "jquery/no-val": 2
35 }
36}
37```
38
39## Development
40
41```
42npm install
43npm test
44```
45
46## License
47
48Distributed under the MIT license. See LICENSE for details.