|
1 |
| -'use strict'; |
| 1 | +"use strict"; |
2 | 2 |
|
3 | 3 | module.exports = {
|
4 | 4 | rules: {
|
5 | 5 | // require corresponding getters for any setters
|
6 |
| - 'accessor-pairs': 'error', |
| 6 | + "accessor-pairs": "error", |
7 | 7 |
|
8 | 8 | // treat var statements as if they were block scoped
|
9 |
| - 'block-scoped-var': 'error', |
| 9 | + "block-scoped-var": "error", |
10 | 10 |
|
11 | 11 | // verify calls of super() in constructors
|
12 |
| - 'constructor-super': 'error', |
| 12 | + "constructor-super": "error", |
13 | 13 |
|
14 | 14 | // require the use of === and !==
|
15 |
| - eqeqeq: 'error', |
| 15 | + eqeqeq: "error", |
16 | 16 |
|
17 | 17 | // make sure for-in loops have an if statement
|
18 |
| - 'guard-for-in': 'error', |
| 18 | + "guard-for-in": "error", |
19 | 19 |
|
20 | 20 | // require a capital letter for constructors
|
21 |
| - 'new-cap': 'error', |
| 21 | + "new-cap": "error", |
22 | 22 |
|
23 | 23 | // disallow the omission of parentheses when invoking a constructor with no arguments
|
24 |
| - 'new-parens': 'error', |
| 24 | + "new-parens": "error", |
25 | 25 |
|
26 | 26 | // disallow use of the Array constructor
|
27 |
| - 'no-array-constructor': 'error', |
| 27 | + "no-array-constructor": "error", |
28 | 28 |
|
29 | 29 | // disallow use of bitwise operators
|
30 |
| - 'no-bitwise': 'error', |
| 30 | + "no-bitwise": "error", |
31 | 31 |
|
32 | 32 | // disallow use of arguments.caller or arguments.callee
|
33 |
| - 'no-caller': 'error', |
| 33 | + "no-caller": "error", |
34 | 34 |
|
35 | 35 | // disallow the catch clause parameter name being the same as a variable in the outer scope
|
36 |
| - 'no-catch-shadow': 'warn', |
| 36 | + "no-catch-shadow": "warn", |
37 | 37 |
|
38 | 38 | // disallow assignment in conditional expressions
|
39 |
| - 'no-cond-assign': 'error', |
| 39 | + "no-cond-assign": "error", |
40 | 40 |
|
41 | 41 | // disallow control characters in regular expressions
|
42 |
| - 'no-control-regex': 'error', |
| 42 | + "no-control-regex": "error", |
43 | 43 |
|
44 | 44 | // disallow use of debugger
|
45 |
| - 'no-debugger': 'error', |
| 45 | + "no-debugger": "error", |
46 | 46 |
|
47 | 47 | // disallow deletion of variables
|
48 |
| - 'no-delete-var': 'error', |
| 48 | + "no-delete-var": "error", |
49 | 49 |
|
50 | 50 | // disallow division operators explicitly at beginning of regular expression
|
51 |
| - 'no-div-regex': 'error', |
| 51 | + "no-div-regex": "error", |
52 | 52 |
|
53 | 53 | // disallow duplicate argument names in functions
|
54 |
| - 'no-dupe-args': 'error', |
| 54 | + "no-dupe-args": "error", |
55 | 55 |
|
56 | 56 | // disallow duplicate keys when creating object literals
|
57 |
| - 'no-dupe-keys': 'error', |
| 57 | + "no-dupe-keys": "error", |
58 | 58 |
|
59 | 59 | // disallow duplicate case labels
|
60 |
| - 'no-duplicate-case': 'error', |
| 60 | + "no-duplicate-case": "error", |
61 | 61 |
|
62 | 62 | // disallow empty statements
|
63 |
| - 'no-empty': 'error', |
| 63 | + "no-empty": "error", |
64 | 64 |
|
65 | 65 | // disallow the use of empty character classes in regular expressions
|
66 |
| - 'no-empty-character-class': 'error', |
| 66 | + "no-empty-character-class": "error", |
67 | 67 |
|
68 | 68 | // disallow comparisons to null without a type-checking operator
|
69 |
| - 'no-eq-null': 'error', |
| 69 | + "no-eq-null": "error", |
70 | 70 |
|
71 | 71 | // disallow use of eval()
|
72 |
| - 'no-eval': 'error', |
| 72 | + "no-eval": "error", |
73 | 73 |
|
74 | 74 | // disallow adding to native types
|
75 |
| - 'no-extend-native': 'error', |
| 75 | + "no-extend-native": "error", |
76 | 76 |
|
77 | 77 | // disallow unnecessary function binding
|
78 |
| - 'no-extra-bind': 'error', |
| 78 | + "no-extra-bind": "error", |
79 | 79 |
|
80 | 80 | // disallow double-negation boolean casts in a boolean context
|
81 |
| - 'no-extra-boolean-cast': 'error', |
| 81 | + "no-extra-boolean-cast": "error", |
82 | 82 |
|
83 | 83 | // disallow unnecessary semicolons
|
84 |
| - 'no-extra-semi': 'error', |
| 84 | + "no-extra-semi": "error", |
85 | 85 |
|
86 | 86 | // disallow fallthrough of case statements
|
87 |
| - 'no-fallthrough': 'error', |
| 87 | + "no-fallthrough": "error", |
88 | 88 |
|
89 | 89 | // disallow the use of leading or trailing decimal points in numeric literals
|
90 |
| - 'no-floating-decimal': 'error', |
| 90 | + "no-floating-decimal": "error", |
91 | 91 |
|
92 | 92 | // disallow overwriting functions written as function declarations
|
93 |
| - 'no-func-assign': 'error', |
| 93 | + "no-func-assign": "error", |
94 | 94 |
|
95 | 95 | // disallow use of eval()-like methods
|
96 |
| - 'no-implied-eval': 'error', |
| 96 | + "no-implied-eval": "error", |
97 | 97 |
|
98 | 98 | // disallow function or variable declarations in nested blocks
|
99 |
| - 'no-inner-declarations': 'error', |
| 99 | + "no-inner-declarations": "error", |
100 | 100 |
|
101 | 101 | // disallow invalid regular expression strings in the RegExp constructor
|
102 |
| - 'no-invalid-regexp': 'error', |
| 102 | + "no-invalid-regexp": "error", |
103 | 103 |
|
104 | 104 | // disallow usage of __iterator__ property
|
105 |
| - 'no-iterator': 'error', |
| 105 | + "no-iterator": "error", |
106 | 106 |
|
107 | 107 | // disallow labels that share a name with a variable
|
108 |
| - 'no-label-var': 'error', |
| 108 | + "no-label-var": "error", |
109 | 109 |
|
110 | 110 | // disallow use of labeled statements
|
111 |
| - 'no-labels': 'error', |
| 111 | + "no-labels": "error", |
112 | 112 |
|
113 | 113 | // disallow unnecessary nested blocks
|
114 |
| - 'no-lone-blocks': 'warn', |
| 114 | + "no-lone-blocks": "warn", |
115 | 115 |
|
116 | 116 | // disallow creation of functions within loops
|
117 |
| - 'no-loop-func': 'warn', |
| 117 | + "no-loop-func": "warn", |
118 | 118 |
|
119 | 119 | // disallow use of multiline strings
|
120 |
| - 'no-multi-str': 'error', |
| 120 | + "no-multi-str": "error", |
121 | 121 |
|
122 | 122 | // disallow reassignments of native objects
|
123 |
| - 'no-native-reassign': 'error', |
| 123 | + "no-native-reassign": "error", |
124 | 124 |
|
125 | 125 | // disallow negation of the left operand of an in expression
|
126 |
| - 'no-negated-in-lhs': 'error', |
| 126 | + "no-negated-in-lhs": "error", |
127 | 127 |
|
128 | 128 | // disallow use of new operator when not part of the assignment or comparison
|
129 |
| - 'no-new': 'error', |
| 129 | + "no-new": "error", |
130 | 130 |
|
131 | 131 | // disallow use of new operator for Function object
|
132 |
| - 'no-new-func': 'error', |
| 132 | + "no-new-func": "error", |
133 | 133 |
|
134 | 134 | // disallow use of the Object constructor
|
135 |
| - 'no-new-object': 'error', |
| 135 | + "no-new-object": "error", |
136 | 136 |
|
137 | 137 | // disallows creating new instances of String, Number, and Boolean
|
138 |
| - 'no-new-wrappers': 'error', |
| 138 | + "no-new-wrappers": "error", |
139 | 139 |
|
140 | 140 | // disallow the use of object properties of the global object (Math and JSON) as functions
|
141 |
| - 'no-obj-calls': 'error', |
| 141 | + "no-obj-calls": "error", |
142 | 142 |
|
143 | 143 | // disallow use of octal literals
|
144 |
| - 'no-octal': 'error', |
| 144 | + "no-octal": "error", |
145 | 145 |
|
146 | 146 | // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \050";
|
147 |
| - 'no-octal-escape': 'error', |
| 147 | + "no-octal-escape": "error", |
148 | 148 |
|
149 | 149 | // disallow usage of __proto__ property
|
150 |
| - 'no-proto': 'error', |
| 150 | + "no-proto": "error", |
151 | 151 |
|
152 | 152 | // disallow declaring the same variable more then once
|
153 |
| - 'no-redeclare': 'error', |
| 153 | + "no-redeclare": "error", |
154 | 154 |
|
155 | 155 | // disallow use of javascript: urls.
|
156 |
| - 'no-script-url': 'error', |
| 156 | + "no-script-url": "error", |
157 | 157 |
|
158 | 158 | // disallow comparisons where both sides are exactly the same
|
159 |
| - 'no-self-compare': 'error', |
| 159 | + "no-self-compare": "error", |
160 | 160 |
|
161 | 161 | // disallow use of comma operator
|
162 |
| - 'no-sequences': 'error', |
| 162 | + "no-sequences": "error", |
163 | 163 |
|
164 | 164 | // disallow declaration of variables already declared in the outer scope
|
165 |
| - 'no-shadow': 'warn', |
| 165 | + "no-shadow": "warn", |
166 | 166 |
|
167 | 167 | // disallow shadowing of names such as arguments
|
168 |
| - 'no-shadow-restricted-names': 'error', |
| 168 | + "no-shadow-restricted-names": "error", |
169 | 169 |
|
170 | 170 | // disallow sparse arrays
|
171 |
| - 'no-sparse-arrays': 'error', |
| 171 | + "no-sparse-arrays": "error", |
172 | 172 |
|
173 | 173 | // disallow throwing non-Error objects
|
174 |
| - 'no-throw-literal': 'error', |
| 174 | + "no-throw-literal": "error", |
175 | 175 |
|
176 | 176 | // disallow use of undeclared variables unless mentioned in a /*global */ block
|
177 |
| - 'no-undef': 'error', |
| 177 | + "no-undef": "error", |
178 | 178 |
|
179 | 179 | // disallow declaration of variables that are not used in the code
|
180 |
| - 'no-unused-vars': [ |
181 |
| - 'error', |
| 180 | + "no-unused-vars": [ |
| 181 | + "error", |
182 | 182 | {
|
183 |
| - vars: 'all', // check "all" variables (as opposed to just "local" variables) |
184 |
| - args: 'after-used', // check any arguments that come "after-used" arguments |
| 183 | + vars: "all", // check "all" variables (as opposed to just "local" variables) |
| 184 | + args: "after-used", // check any arguments that come "after-used" arguments |
185 | 185 | },
|
186 | 186 | ],
|
187 | 187 |
|
188 | 188 | // disallow use of void operator
|
189 |
| - 'no-void': 'error', |
| 189 | + "no-void": "error", |
190 | 190 |
|
191 | 191 | // disallow use of the with statement
|
192 |
| - 'no-with': 'error', |
| 192 | + "no-with": "error", |
193 | 193 |
|
194 | 194 | // require assignment operator shorthand where possible
|
195 |
| - 'operator-assignment': 'error', |
| 195 | + "operator-assignment": "error", |
196 | 196 |
|
197 | 197 | // Require the "use strict" pragma, either at the global level or function level,
|
198 | 198 | // depending on whether CommonJS is being used or not
|
199 | 199 | strict: [
|
200 |
| - 'error', |
201 |
| - 'safe', |
| 200 | + "error", |
| 201 | + "safe", |
202 | 202 | ],
|
203 | 203 |
|
204 | 204 | // disallow comparisons with the value NaN
|
205 |
| - 'use-isnan': 'error', |
| 205 | + "use-isnan": "error", |
206 | 206 |
|
207 | 207 | // Ensure that the results of typeof are compared against a valid string
|
208 |
| - 'valid-typeof': 'error', |
| 208 | + "valid-typeof": "error", |
209 | 209 |
|
210 | 210 | // require immediate function invocation to be wrapped in parentheses
|
211 |
| - 'wrap-iife': 'error', |
| 211 | + "wrap-iife": "error", |
212 | 212 |
|
213 | 213 | // disallow Yoda conditions
|
214 |
| - yoda: 'error', |
| 214 | + yoda: "error", |
215 | 215 |
|
216 | 216 | }
|
217 | 217 | };
|
0 commit comments