Build: Take core-js-bundle from the external directory as well
[jquery.git] / src / .eslintrc.json
blobf1b596dff1b075e925c45659b16914fa306d8d85
2         "root": true,
4         "extends": "../.eslintrc-browser.json",
6         "parserOptions": {
7                 "ecmaVersion": 2015,
8                 "sourceType": "module"
9         },
11         "plugins": [ "import" ],
13         "rules": {
14                 "import/extensions": [ "error", "always" ],
15                 "import/no-cycle": "error",
16                 "import/no-unused-modules": [ "error", {
17                         "unusedExports": true,
19                         // When run via WebStorm, the root path against which these paths
20                         // are resolved is the path where this ESLint config file lies,
21                         // i.e. `src`. When run via the command line, it's usually the root
22                         // folder of the jQuery repository. This pattern intends to catch both.
23                         // Note that we cannot specify two patterns here:
24                         //     [ "src/*.js", "*.js" ]
25                         // as they're analyzed individually and the rule crashes if a pattern
26                         // cannot be matched.
27                         "ignoreExports": [ "{src/,}*.js" ]
28                 } ],
29                 "indent": [ "error", "tab", {
30                         "outerIIFEBody": 0
31                 } ]
32         },
34         "overrides": [
35                 {
36                         "files": "wrapper.js",
37                         "parserOptions": {
38                                 "ecmaVersion": 5,
39                                 "sourceType": "script"
40                         },
41                         "rules": {
42                                 "no-unused-vars": "off",
43                                 "indent": [ "error", "tab", {
45                                         // Unlike other codes, "wrapper.js" is implemented in UMD.
46                                         // So it required a specific exception for jQuery's UMD
47                                         // Code Style. This makes that indentation check is not
48                                         // performed for 1 depth of outer FunctionExpressions
49                                         "ignoredNodes": [
50                                                 "Program > ExpressionStatement > CallExpression > :last-child > *"
51                                         ]
52                                 } ]
53                         },
54                         "globals": {
55                                 "jQuery": false,
56                                 "module": true
57                         }
58                 },
60                 {
61                         "files": "exports/amd.js",
62                         "globals": {
63                                 "define": false
64                         }
65                 },
67                 {
68                         "files": "core.js",
69                         "globals": {
71                                 // Defining Symbol globally would create a danger of using
72                                 // it unguarded in another place, it seems safer to define
73                                 // it only for this module.
74                                 "Symbol": false
75                         }
76                 }
77         ]