1 | {
|
2 | "env": {
|
3 | "node": true
|
4 | },
|
5 | "parser": "babel-eslint",
|
6 | "plugins": ["import"],
|
7 | "rules": {
|
8 | // enforces getter/setter pairs in objects
|
9 | "accessor-pairs": 0,
|
10 | // treat var statements as if they were block scoped
|
11 | "block-scoped-var": 2,
|
12 | // specify the maximum cyclomatic complexity allowed in a program
|
13 | "complexity": [0, 11],
|
14 | // require return statements to either always or never specify values
|
15 | "consistent-return": 2,
|
16 | // specify curly brace conventions for all control statements
|
17 | "curly": [2, "multi", "consistent"],
|
18 | // require default case in switch statements
|
19 | "default-case": 2,
|
20 | // encourages use of dot notation whenever possible
|
21 | "dot-notation": [2, { "allowKeywords": true }],
|
22 | // enforces consistent newlines before or after dots
|
23 | "dot-location": 0,
|
24 | // require the use of === and !==
|
25 | "eqeqeq": 2,
|
26 | // make sure for-in loops have an if statement
|
27 | "guard-for-in": 2,
|
28 | // disallow the use of alert, confirm, and prompt
|
29 | "no-alert": 1,
|
30 | // disallow use of arguments.caller or arguments.callee
|
31 | "no-caller": 2,
|
32 | // disallow lexical declarations in case/default clauses
|
33 | // http://eslint.org/docs/rules/no-case-declarations.html
|
34 | "no-case-declarations": 2,
|
35 | // disallow division operators explicitly at beginning of regular expression
|
36 | "no-div-regex": 0,
|
37 | // disallow else after a return in an if
|
38 | "no-else-return": 2,
|
39 | // disallow comparisons to null without a type-checking operator
|
40 | "no-eq-null": 0,
|
41 | // disallow use of eval()
|
42 | "no-eval": 2,
|
43 | // disallow adding to native types
|
44 | "no-extend-native": 2,
|
45 | // disallow unnecessary function binding
|
46 | "no-extra-bind": 2,
|
47 | // disallow fallthrough of case statements
|
48 | "no-fallthrough": 2,
|
49 | // disallow the use of leading or trailing decimal points in numeric literals
|
50 | "no-floating-decimal": 2,
|
51 | // disallow the type conversions with shorter notations
|
52 | "no-implicit-coercion": 0,
|
53 | // disallow use of eval()-like methods
|
54 | "no-implied-eval": 2,
|
55 | // disallow this keywords outside of classes or class-like objects
|
56 | "no-invalid-this": 0,
|
57 | // disallow usage of __iterator__ property
|
58 | "no-iterator": 2,
|
59 | // disallow use of labeled statements
|
60 | "no-labels": 2,
|
61 | // disallow unnecessary nested blocks
|
62 | "no-lone-blocks": 2,
|
63 | // disallow creation of functions within loops
|
64 | "no-loop-func": 2,
|
65 | // disallow use of multiple spaces
|
66 | "no-multi-spaces": 2,
|
67 | // disallow use of multiline strings
|
68 | "no-multi-str": 2,
|
69 | // disallow reassignments of native objects
|
70 | "no-native-reassign": 2,
|
71 | // disallow use of new operator when not part of the assignment or comparison
|
72 | "no-new": 2,
|
73 | // disallow use of new operator for Function object
|
74 | "no-new-func": 2,
|
75 | // disallows creating new instances of String,Number, and Boolean
|
76 | "no-new-wrappers": 2,
|
77 | // disallow use of (old style) octal literals
|
78 | "no-octal": 2,
|
79 | // disallow use of octal escape sequences in string literals, such as
|
80 | // var foo = "Copyright \251";
|
81 | "no-octal-escape": 2,
|
82 | // disallow use of process.env
|
83 | "no-process-env": 0,
|
84 | // disallow usage of __proto__ property
|
85 | "no-proto": 2,
|
86 | // disallow declaring the same variable more then once
|
87 | "no-redeclare": 2,
|
88 | // disallow use of assignment in return statement
|
89 | "no-return-assign": 2,
|
90 | // disallow use of `javascript:` urls.
|
91 | "no-script-url": 2,
|
92 | // disallow comparisons where both sides are exactly the same
|
93 | "no-self-compare": 2,
|
94 | // disallow use of comma operator
|
95 | "no-sequences": 2,
|
96 | // restrict what can be thrown as an exception
|
97 | "no-throw-literal": 2,
|
98 | // disallow usage of expressions in statement position
|
99 | "no-unused-expressions": 1,
|
100 | // disallow unnecessary .call() and .apply()
|
101 | "no-useless-call": 0,
|
102 | // disallow use of void operator
|
103 | "no-void": 0,
|
104 | // disallow usage of configurable warning terms in comments: e.g. todo
|
105 | "no-warning-comments": [0, { "terms": ["todo", "fixme", "xxx"], "location": "start" }],
|
106 | // disallow use of the with statement
|
107 | "no-with": 2,
|
108 | // require use of the second argument for parseInt()
|
109 | "radix": 2,
|
110 | // requires to declare all vars on top of their containing scope
|
111 | "vars-on-top": 2,
|
112 | // require immediate function invocation to be wrapped in parentheses
|
113 | // http://eslint.org/docs/rules/wrap-iife.html
|
114 | "wrap-iife": [2, "outside"],
|
115 | // require or disallow Yoda conditions
|
116 | "yoda": 2,
|
117 | // enforce return after a callback
|
118 | "callback-return": 0,
|
119 | // enforces error handling in callbacks (node environment)
|
120 | "handle-callback-err": 0,
|
121 | // disallow mixing regular variable and require declarations
|
122 | "no-mixed-requires": [0, false],
|
123 | // disallow use of new operator with the require function
|
124 | "no-new-require": 0,
|
125 | // disallow string concatenation with __dirname and __filename
|
126 | "no-path-concat": 0,
|
127 | // disallow process.exit()
|
128 | "no-process-exit": 0,
|
129 | // restrict usage of specified node modules
|
130 | "no-restricted-modules": 0,
|
131 | // disallow use of synchronous methods (off by default)
|
132 | "no-sync": 0,
|
133 | // enforces no braces where they can be omitted
|
134 | // http://eslint.org/docs/rules/arrow-body-style
|
135 | "arrow-body-style": [1, "as-needed"],
|
136 | // require parens in arrow function arguments
|
137 | "arrow-parens": 0,
|
138 | // require space before/after arrow function"s arrow
|
139 | // https://github.com/eslint/eslint/blob/master/docs/rules/arrow-spacing.md
|
140 | "arrow-spacing": [1, { "before": true, "after": true }],
|
141 | // verify super() callings in constructors
|
142 | "constructor-super": 0,
|
143 | // enforce the spacing around the * in generator functions
|
144 | "generator-star-spacing": 0,
|
145 | // disallow modifying variables of class declarations
|
146 | "no-class-assign": 0,
|
147 | // disallow modifying variables that are declared using const
|
148 | "no-const-assign": 2,
|
149 | // disallow to use this/super before super() calling in constructors.
|
150 | "no-this-before-super": 0,
|
151 | // require let or const instead of var
|
152 | "no-var": 2,
|
153 | // require method and property shorthand syntax for object literals
|
154 | // https://github.com/eslint/eslint/blob/master/docs/rules/object-shorthand.md
|
155 | "object-shorthand": [2, "always"],
|
156 | // suggest using arrow functions as callbacks
|
157 | "prefer-arrow-callback": 2,
|
158 | // suggest using of const declaration for variables that are never modified after declared
|
159 | "prefer-const": 1,
|
160 | // suggest using the spread operator instead of .apply()
|
161 | "prefer-spread": 0,
|
162 | // suggest using Reflect methods where applicable
|
163 | "prefer-reflect": 0,
|
164 | // suggest using template literals instead of string concatenation
|
165 | // http://eslint.org/docs/rules/prefer-template
|
166 | "prefer-template": 1,
|
167 | // disallow generator functions that do not have yield
|
168 | "require-yield": 0,
|
169 | "import/default": 2,
|
170 | "import/export": 2,
|
171 | "import/named": 2,
|
172 | "import/namespace": 2,
|
173 | "import/no-unresolved": [2, {"commonjs": true, "amd": true}],
|
174 | "new-cap": [2, {"capIsNew": false, "newIsCap": true}],
|
175 | "no-console": 1,
|
176 | "no-shadow": 1,
|
177 | "no-unused-vars": 1,
|
178 | "no-use-before-define": [2, "nofunc"],
|
179 | "object-curly-spacing": [2, "never"],
|
180 | "padded-blocks": 0,
|
181 | "spaced-comment": 1,
|
182 | "strict": [2, "never"],
|
183 | "semi": [1, "always"]
|
184 | },
|
185 | "globals": {
|
186 | "require": false
|
187 | },
|
188 | "settings": {
|
189 | "import/ignore": [
|
190 | "node_modules",
|
191 | "lib",
|
192 | "\\.json$"
|
193 | ],
|
194 | "import/parser": "babel-eslint",
|
195 | "import/resolve": {
|
196 | "extensions": [
|
197 | ".js",
|
198 | ".json"
|
199 | ]
|
200 | }
|
201 | }
|
202 | }
|