1 |
|
2 |
|
3 | module.exports = {
|
4 | parser: 'esprima',
|
5 | rules: {
|
6 | /**
|
7 | * Possible Errors
|
8 | * The following rules point out areas where you might have made mistakes.
|
9 | */
|
10 |
|
11 | 'comma-dangle': [
|
12 | 2,
|
13 | 'never'
|
14 | ], // disallow or enforce trailing commas - http://eslint.org/docs/rules/comma-dangle
|
15 | 'no-cond-assign': [
|
16 | 2,
|
17 | 'except-parens'
|
18 | ], // disallow assignment in conditional expressions - http://eslint.org/docs/rules/no-cond-assign
|
19 | 'no-console': 1, // disallow use of console - http://eslint.org/docs/rules/no-console
|
20 | 'no-constant-condition': 2, // disallow use of constant expressions in conditions - http://eslint.org/docs/rules/no-constant-condition
|
21 | 'no-control-regex': 2, // disallow control characters in regular expressions - http://eslint.org/docs/rules/no-control-regex
|
22 | 'no-debugger': 2, // disallow use of debugger - http://eslint.org/docs/rules/no-debugger
|
23 | 'no-dupe-args': 2, // disallow duplicate arguments in functions - http://eslint.org/docs/rules/no-dupe-args
|
24 | 'no-dupe-keys': 2, // disallow duplicate keys when creating object literals - http://eslint.org/docs/rules/no-dupe-keys
|
25 | 'no-duplicate-case': 2, // disallow a duplicate case label. - http://eslint.org/docs/rules/no-duplicate-case
|
26 | 'no-empty': 2, // disallow empty block statements - http://eslint.org/docs/rules/no-empty
|
27 | 'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions - http://eslint.org/docs/rules/no-empty-character-class
|
28 | 'no-ex-assign': 2, // disallow assigning to the exception in a catch block - http://eslint.org/docs/rules/no-ex-assign
|
29 | 'no-extra-boolean-cast': 2, // disallow double-negation boolean casts in a boolean context - http://eslint.org/docs/rules/no-extra-boolean-cast
|
30 | 'no-extra-parens': [
|
31 | 2,
|
32 | 'all',
|
33 | {
|
34 | conditionalAssign: true
|
35 | }
|
36 | ], // disallow unnecessary parentheses - http://eslint.org/docs/rules/no-extra-parens
|
37 | 'no-extra-semi': 2, // disallow unnecessary semicolons - http://eslint.org/docs/rules/no-extra-semi
|
38 | 'no-func-assign': 2, // disallow overwriting functions written as function declarations - http://eslint.org/docs/rules/no-func-assign
|
39 | 'no-inner-declarations': 2, // disallow function or variable declarations in nested blocks - http://eslint.org/docs/rules/no-inner-declarations
|
40 | 'no-invalid-regexp': 2, // disallow invalid regular expression strings in the RegExp constructor - http://eslint.org/docs/rules/no-invalid-regexp
|
41 | 'no-irregular-whitespace': 2, // disallow irregular whitespace outside of strings and comments - http://eslint.org/docs/rules/no-irregular-whitespace
|
42 | 'no-negated-in-lhs': 2, // disallow negation of the left operand of an in expression - http://eslint.org/docs/rules/no-negated-in-lhs
|
43 | 'no-obj-calls': 2, // disallow the use of object properties of the global object (Math and JSON) as functions - http://eslint.org/docs/rules/no-obj-calls
|
44 | 'no-regex-spaces': 2, // disallow multiple spaces in a regular expression literal - http://eslint.org/docs/rules/no-regex-spaces
|
45 | 'no-sparse-arrays': 2, // disallow sparse arrays - http://eslint.org/docs/rules/no-sparse-arrays
|
46 | 'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one - http://eslint.org/docs/rules/no-unexpected-multiline
|
47 | 'no-unreachable': 2, // disallow unreachable statements after a return, throw, continue, or break statement - http://eslint.org/docs/rules/no-unreachable
|
48 | 'use-isnan': 2, // disallow comparisons with the value NaN - http://eslint.org/docs/rules/use-isnan
|
49 | 'valid-jsdoc': [
|
50 | 1,
|
51 | {
|
52 | prefer: {
|
53 | returns: 'returns'
|
54 | },
|
55 | requireReturn: true,
|
56 | requireParamDescription: true,
|
57 | requireReturnDescription: true,
|
58 | requireReturnType: true
|
59 | }
|
60 | ], // Ensure JSDoc comments are valid - http://eslint.org/docs/rules/valid-jsdoc
|
61 | 'valid-typeof': 2, // Ensure that the results of typeof are compared against a valid string - http://eslint.org/docs/rules/valid-typeof
|
62 |
|
63 | /**
|
64 | * Best Practices
|
65 | * These are rules designed to prevent you from making mistakes. They either
|
66 | * prescribe a better way of doing something or help you avoid footguns.
|
67 | */
|
68 |
|
69 | 'accessor-pairs': 2, // Enforces getter/setter pairs in objects - http://eslint.org/docs/rules/accessor-pairs
|
70 | 'array-callback-return': 2, // Enforces return statements in callbacks of array’s methods - http://eslint.org/docs/rules/array-callback-return
|
71 | 'block-scoped-var': 2, // treat var statements as if they were block scoped - http://eslint.org/docs/rules/block-scoped-var
|
72 | 'complexity': [
|
73 | 2,
|
74 | 11
|
75 | ], // specify the maximum cyclomatic complexity allowed in a program - http://eslint.org/docs/rules/complexity
|
76 | 'consistent-return': 2, // require return statements to either always or never specify values - http://eslint.org/docs/rules/consistent-return
|
77 | 'curly': [
|
78 | 2,
|
79 | 'multi'
|
80 | ], // specify curly brace conventions for all control statements - http://eslint.org/docs/rules/curly
|
81 | 'default-case': 2, // require default case in switch statements - http://eslint.org/docs/rules/default-case
|
82 | 'dot-location': [
|
83 | 2,
|
84 | 'property'
|
85 | ], // enforces consistent newlines before or after dots - http://eslint.org/docs/rules/dot-location
|
86 | 'dot-notation': 2, // encourages use of dot notation whenever possible - http://eslint.org/docs/rules/dot-notation
|
87 | 'eqeqeq': [
|
88 | 2,
|
89 | 'allow-null'
|
90 | ], // require the use of === and !== - http://eslint.org/docs/rules/eqeqeq
|
91 | 'guard-for-in': 2, // make sure for-in loops have an if statement - http://eslint.org/docs/rules/guard-for-in
|
92 | 'no-alert': 2, // disallow the use of alert, confirm, and prompt - http://eslint.org/docs/rules/no-alert
|
93 | 'no-caller': 2, // disallow use of arguments.caller or arguments.callee - http://eslint.org/docs/rules/no-caller
|
94 | 'no-case-declarations': 2, // disallow lexical declarations in case clauses - http://eslint.org/docs/rules/no-case-declarations
|
95 | 'no-div-regex': 2, // disallow division operators explicitly at beginning of regular expression - http://eslint.org/docs/rules/no-div-regex
|
96 | 'no-else-return': 2, // disallow else after a return in an if - http://eslint.org/docs/rules/no-else-return
|
97 | 'no-empty-function': 2, // disallow use of empty functions - http://eslint.org/docs/rules/no-empty-function
|
98 | 'no-empty-pattern': 2, // disallow use of empty destructuring patterns - http://eslint.org/docs/rules/no-empty-pattern
|
99 | 'no-eq-null': 0, // disallow comparisons to null without a type-checking operator - http://eslint.org/docs/rules/no-eq-null
|
100 | 'no-eval': 2, // disallow use of eval() - http://eslint.org/docs/rules/no-eval
|
101 | 'no-extend-native': 2, // disallow adding to native types - http://eslint.org/docs/rules/no-extend-native
|
102 | 'no-extra-bind': 2, // disallow unnecessary function binding - http://eslint.org/docs/rules/no-extra-bind
|
103 | 'no-extra-label': 2, // disallow unnecessary labels - http://eslint.org/docs/rules/no-extra-label
|
104 | 'no-fallthrough': 0, // disallow fallthrough of case statements - http://eslint.org/docs/rules/no-fallthrough
|
105 | 'no-floating-decimal': 2, // disallow the use of leading or trailing decimal points in numeric literals - http://eslint.org/docs/rules/no-floating-decimal
|
106 | 'no-implicit-coercion': 2, // disallow the type conversions with shorter notations - http://eslint.org/docs/rules/no-implicit-coercion
|
107 | 'no-implicit-globals': 2, // disallow var and named functions in global scope - http://eslint.org/docs/rules/no-implicit-globals
|
108 | 'no-implied-eval': 2, // disallow use of eval()-like methods - http://eslint.org/docs/rules/no-implied-eval
|
109 | 'no-invalid-this': 2, // disallow this keywords outside of classes or class-like objects - http://eslint.org/docs/rules/no-invalid-this
|
110 | 'no-iterator': 2, // disallow usage of __iterator__ property - http://eslint.org/docs/rules/no-iterator
|
111 | 'no-labels': 2, // disallow use of labeled statements - http://eslint.org/docs/rules/no-labels
|
112 | 'no-lone-blocks': 2, // disallow unnecessary nested blocks - http://eslint.org/docs/rules/no-lone-blocks
|
113 | 'no-loop-func': 2, // disallow creation of functions within loops - http://eslint.org/docs/rules/no-loop-func
|
114 | 'no-magic-numbers': 0, // disallow the use of magic numbers - http://eslint.org/docs/rules/no-magic-numbers
|
115 | 'no-multi-spaces': 2, // disallow use of multiple spaces - http://eslint.org/docs/rules/no-multi-spaces
|
116 | 'no-multi-str': 2, // disallow use of multiline strings - http://eslint.org/docs/rules/no-multi-str
|
117 | 'no-native-reassign': 2, // disallow reassignments of native objects - http://eslint.org/docs/rules/no-native-reassign
|
118 | 'no-new': 2, // disallow use of the new operator when not part of an assignment or comparison - http://eslint.org/docs/rules/no-new
|
119 | 'no-new-func': 2, // disallow use of new operator for Function object - http://eslint.org/docs/rules/no-new-func
|
120 | 'no-new-wrappers': 2, // disallows creating new instances of String,Number, and Boolean - http://eslint.org/docs/rules/no-new-wrappers
|
121 | 'no-octal': 2, // disallow use of octal literals - http://eslint.org/docs/rules/no-octal
|
122 | 'no-octal-escape': 2, // disallow use of octal escape sequences in string literals, such as var foo = 'Copyright \251'; - http://eslint.org/docs/rules/no-octal-escape
|
123 | 'no-param-reassign': 0, // disallow reassignment of function parameters - http://eslint.org/docs/rules/no-param-reassign
|
124 | 'no-proto': 2, // disallow usage of __proto__ property - http://eslint.org/docs/rules/no-proto
|
125 | 'no-redeclare': 2, // disallow declaring the same variable more than once - http://eslint.org/docs/rules/no-redeclare
|
126 | 'no-return-assign': [
|
127 | 2,
|
128 | 'except-parens'
|
129 | ], // disallow use of assignment in return statement - http://eslint.org/docs/rules/no-return-assign
|
130 | 'no-script-url': 2, // disallow use of javascript: urls. - http://eslint.org/docs/rules/no-script-url
|
131 | 'no-self-assign': 2, // disallow assignments where both sides are exactly the same - http://eslint.org/docs/rules/no-self-assign
|
132 | 'no-self-compare': 2, // disallow comparisons where both sides are exactly the same - http://eslint.org/docs/rules/no-self-compare
|
133 | 'no-sequences': 2, // disallow use of the comma operator - http://eslint.org/docs/rules/no-sequences
|
134 | 'no-throw-literal': 2, // restrict what can be thrown as an exception - http://eslint.org/docs/rules/no-throw-literal
|
135 | 'no-unmodified-loop-condition': 2, // disallow unmodified conditions of loops - http://eslint.org/docs/rules/no-unmodified-loop-condition
|
136 | 'no-unused-expressions': 2, // disallow usage of expressions in statement position - http://eslint.org/docs/rules/no-unused-expressions
|
137 | 'no-unused-labels': 2, // disallow unused labels - http://eslint.org/docs/rules/no-unused-labels
|
138 | 'no-useless-call': 2, // disallow unnecessary .call() and .apply() - http://eslint.org/docs/rules/no-useless-call
|
139 | 'no-useless-concat': 2, // disallow unnecessary concatenation of literals or template literals - http://eslint.org/docs/rules/no-useless-concat
|
140 | 'no-void': 2, // disallow use of the void operator - http://eslint.org/docs/rules/no-void
|
141 | 'no-warning-comments': 1, // disallow usage of configurable warning terms in comments - e.g. TODO or FIXME - http://eslint.org/docs/rules/no-warning-comments
|
142 | 'no-with': 2, // disallow use of the with statement - http://eslint.org/docs/rules/no-with
|
143 | 'radix': 2, // require use of the second argument for parseInt() - http://eslint.org/docs/rules/radix
|
144 | 'vars-on-top': 2, // require declaration of all vars at the top of their containing scope - http://eslint.org/docs/rules/vars-on-top
|
145 | 'wrap-iife': [
|
146 | 2,
|
147 | 'inside'
|
148 | ], // require immediate function invocation to be wrapped in parentheses - http://eslint.org/docs/rules/wrap-iife
|
149 | 'yoda': 1, // require or disallow Yoda conditions - http://eslint.org/docs/rules/yoda
|
150 |
|
151 | /**
|
152 | * Strict Mode
|
153 | * These rules relate to using strict mode and strict mode directives.
|
154 | */
|
155 |
|
156 | 'strict': [
|
157 | 2,
|
158 | 'safe'
|
159 | ], // require effective use of strict mode directives - http://eslint.org/docs/rules/strict
|
160 |
|
161 | /**
|
162 | * Variables
|
163 | * These rules have to do with variable declarations.
|
164 | */
|
165 |
|
166 | 'init-declarations': 0, // enforce or disallow variable initializations at definition - http://eslint.org/docs/rules/init-declarations
|
167 | 'no-catch-shadow': 2, // disallow the catch clause parameter name being the same as a variable in the outer scope - http://eslint.org/docs/rules/no-catch-shadow
|
168 | 'no-delete-var': 2, // disallow deletion of variables - http://eslint.org/docs/rules/no-delete-var
|
169 | 'no-label-var': 2, // disallow labels that share a name with a variable - http://eslint.org/docs/rules/no-label-var
|
170 | 'no-restricted-globals': 2, // restrict usage of specified global variables - http://eslint.org/docs/rules/no-restricted-globals
|
171 | 'no-shadow': 2, // disallow declaration of variables already declared in the outer scope - http://eslint.org/docs/rules/no-shadow
|
172 | 'no-shadow-restricted-names': 2, // disallow shadowing of names such as arguments - http://eslint.org/docs/rules/no-shadow-restricted-names
|
173 | 'no-undef': 2, // disallow use of undeclared variables unless mentioned in a /*global */ block - http://eslint.org/docs/rules/no-undef
|
174 | 'no-undef-init': 0, // disallow use of undefined when initializing variables - http://eslint.org/docs/rules/no-undef-init
|
175 | 'no-undefined': 2, // disallow use of undefined variable - http://eslint.org/docs/rules/no-undefined
|
176 | 'no-unused-vars': 2, // disallow declaration of variables that are not used in the code - http://eslint.org/docs/rules/no-unused-vars
|
177 | 'no-use-before-define': 2, // disallow use of variables before they are defined - http://eslint.org/docs/rules/no-use-before-define
|
178 |
|
179 | /**
|
180 | * Node.js and CommonJS
|
181 | * These rules are specific to JavaScript running on Node.js or using
|
182 | * CommonJS in the browser.
|
183 | */
|
184 |
|
185 | 'callback-return': 2, // enforce return after a callback - http://eslint.org/docs/rules/callback-return
|
186 | 'global-require': 2, // enforce require() on top-level module scope - http://eslint.org/docs/rules/global-require
|
187 | 'handle-callback-err': 2, // enforce error handling in callbacks - http://eslint.org/docs/rules/handle-callback-err
|
188 | 'no-mixed-requires': 2, // disallow mixing regular variable and require declarations - http://eslint.org/docs/rules/no-mixed-requires
|
189 | 'no-new-require': 2, // disallow use of new operator with the require function - http://eslint.org/docs/rules/no-new-require
|
190 | 'no-path-concat': 2, // disallow string concatenation with __dirname and __filename - http://eslint.org/docs/rules/no-path-concat
|
191 | 'no-process-env': 0, // disallow use of process.env - http://eslint.org/docs/rules/no-process-env
|
192 | 'no-process-exit': 2, // disallow process.exit() - http://eslint.org/docs/rules/no-process-exit
|
193 | 'no-restricted-modules': 0, // restrict usage of specified modules when loaded by require function - http://eslint.org/docs/rules/no-restricted-modules
|
194 | 'no-sync': 2, // disallow use of synchronous methods - http://eslint.org/docs/rules/no-sync
|
195 |
|
196 | /**
|
197 | * Stylistic Issues
|
198 | * These rules are purely matters of style and are quite subjective.
|
199 | */
|
200 |
|
201 | 'array-bracket-spacing': [
|
202 | 2,
|
203 | 'always',
|
204 | {
|
205 | singleValue: false,
|
206 | arraysInArrays: false,
|
207 | objectsInArrays: false
|
208 | }
|
209 | ], // enforce spacing inside array brackets - http://eslint.org/docs/rules/array-bracket-spacing
|
210 | 'block-spacing': 2, // disallow or enforce spaces inside of single line blocks - http://eslint.org/docs/rules/block-spacing
|
211 | 'brace-style': [
|
212 | 2,
|
213 | '1tbs',
|
214 | {
|
215 | allowSingleLine: true
|
216 | }
|
217 | ], // enforce one true brace style - http://eslint.org/docs/rules/brace-style
|
218 | 'camelcase': 2, // require camel case names - http://eslint.org/docs/rules/camelcase
|
219 | 'comma-spacing': 2, // enforce spacing before and after comma - http://eslint.org/docs/rules/comma-spacing
|
220 | 'comma-style': 0, // enforce one true comma style - http://eslint.org/docs/rules/comma-style
|
221 | 'computed-property-spacing': 2, // require or disallow padding inside computed properties - http://eslint.org/docs/rules/computed-property-spacing
|
222 | 'consistent-this': [
|
223 | 2,
|
224 | 'that',
|
225 | 'self'
|
226 | ], // enforce consistent naming when capturing the current execution context - http://eslint.org/docs/rules/consistent-this
|
227 | 'eol-last': 2, // enforce newline at the end of file, with no multiple empty lines - http://eslint.org/docs/rules/eol-last
|
228 | 'func-names': 0, // require function expressions to have a name - http://eslint.org/docs/rules/func-names
|
229 | 'func-style': [
|
230 | 2,
|
231 | 'declaration',
|
232 | {
|
233 | allowArrowFunctions: true
|
234 | }
|
235 | ], // enforce use of function declarations or expressions - http://eslint.org/docs/rules/func-style
|
236 | 'id-blacklist': 0, // blacklist certain identifiers to prevent them being used - http://eslint.org/docs/rules/id-blacklist
|
237 | 'id-length': 0, // this option enforces minimum and maximum identifier lengths (variable names, property names etc.) - http://eslint.org/docs/rules/id-length
|
238 | 'id-match': 0, // require identifiers to match the provided regular expression - http://eslint.org/docs/rules/id-match
|
239 | 'indent': [
|
240 | 2,
|
241 | 2
|
242 | ], // specify tab or space width for your code - http://eslint.org/docs/rules/indent
|
243 | 'jsx-quotes': [
|
244 | 2,
|
245 | 'prefer-double'
|
246 | ], // specify whether double or single quotes should be used in JSX attributes - http://eslint.org/docs/rules/jsx-quotes
|
247 | 'key-spacing': 2, // enforce spacing between keys and values in object literal properties - http://eslint.org/docs/rules/key-spacing
|
248 | 'keyword-spacing': 2, // enforce spacing before and after keywords - http://eslint.org/docs/rules/keyword-spacing
|
249 | 'linebreak-style': 2, // disallow mixed ‘LF’ and ‘CRLF’ as linebreaks - http://eslint.org/docs/rules/linebreak-style
|
250 | 'lines-around-comment': 0, // enforce empty lines around comments - http://eslint.org/docs/rules/lines-around-comment
|
251 | 'max-depth': [
|
252 | 2,
|
253 | 4
|
254 | ], // specify the maximum depth that blocks can be nested - http://eslint.org/docs/rules/max-depth
|
255 | 'max-len': [
|
256 | 2,
|
257 | {
|
258 | code: 80,
|
259 | tabWidth: 2,
|
260 | ignoreUrls: true,
|
261 | ignoreTrailingComments: true
|
262 | }
|
263 | ], // specify the maximum length of a line in your program - http://eslint.org/docs/rules/max-len
|
264 | 'max-nested-callbacks': [
|
265 | 2,
|
266 | 4
|
267 | ], // specify the maximum depth callbacks can be nested - http://eslint.org/docs/rules/max-nested-callbacks
|
268 | 'max-params': [
|
269 | 2,
|
270 | 4
|
271 | ], // limits the number of parameters that can be used in the function declaration - http://eslint.org/docs/rules/max-params
|
272 | 'max-statements': [
|
273 | 2,
|
274 | 11
|
275 | ], // specify the maximum number of statement allowed in a function - http://eslint.org/docs/rules/max-statements
|
276 | 'new-cap': 2, // require a capital letter for constructors - http://eslint.org/docs/rules/new-cap
|
277 | 'new-parens': 2, // disallow the omission of parentheses when invoking a constructor with no arguments - http://eslint.org/docs/rules/new-parens
|
278 | 'newline-after-var': 2, // require or disallow an empty newline after variable declarations - http://eslint.org/docs/rules/newline-after-var
|
279 | 'newline-before-return': 0, // require newline before return statement - http://eslint.org/docs/rules/newline-before-return
|
280 | 'newline-per-chained-call': 2, // enforce newline after each call when chaining the calls - http://eslint.org/docs/rules/newline-per-chained-call
|
281 | 'no-array-constructor': 2, // disallow use of the Array constructor - http://eslint.org/docs/rules/no-array-constructor
|
282 | 'no-bitwise': 2, // disallow use of bitwise operators - http://eslint.org/docs/rules/no-bitwise
|
283 | 'no-continue': 2, // disallow use of the continue statement - http://eslint.org/docs/rules/no-continue
|
284 | 'no-inline-comments': 0, // disallow comments inline after code - http://eslint.org/docs/rules/no-inline-comments
|
285 | 'no-lonely-if': 2, // disallow if as the only statement in an else block - http://eslint.org/docs/rules/no-lonely-if
|
286 | 'no-mixed-spaces-and-tabs': 2, // disallow mixed spaces and tabs for indentation - http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
|
287 | 'no-multiple-empty-lines': [
|
288 | 2,
|
289 | {
|
290 | max: 2
|
291 | }
|
292 | ], // disallow multiple empty lines - http://eslint.org/docs/rules/no-multiple-empty-lines
|
293 | 'no-negated-condition': 1, // disallow negated conditions - http://eslint.org/docs/rules/no-negated-condition
|
294 | 'no-nested-ternary': 2, // disallow nested ternary expressions - http://eslint.org/docs/rules/no-nested-ternary
|
295 | 'no-new-object': 2, // disallow the use of the Object constructor - http://eslint.org/docs/rules/no-new-object
|
296 | 'no-plusplus': 0, // disallow use of unary operators, ++ and -- - http://eslint.org/docs/rules/no-plusplus
|
297 | 'no-restricted-syntax': [
|
298 | 2,
|
299 | 'WithStatement'
|
300 | ], // disallow use of certain syntax in code - http://eslint.org/docs/rules/no-restricted-syntax
|
301 | 'no-spaced-func': 2, // disallow space between function identifier and application - http://eslint.org/docs/rules/no-spaced-func
|
302 | 'no-ternary': 0, // disallow the use of ternary operators - http://eslint.org/docs/rules/no-ternary
|
303 | 'no-trailing-spaces': 2, // disallow trailing whitespace at the end of lines - http://eslint.org/docs/rules/no-trailing-spaces
|
304 | 'no-underscore-dangle': 2, // disallow dangling underscores in identifiers - http://eslint.org/docs/rules/no-underscore-dangle
|
305 | 'no-unneeded-ternary': 2, // disallow the use of ternary operators when a simpler alternative exists - http://eslint.org/docs/rules/no-unneeded-ternary
|
306 | 'no-whitespace-before-property': 2, // disallow whitespace before properties - http://eslint.org/docs/rules/no-whitespace-before-property
|
307 | 'object-curly-spacing': [
|
308 | 2,
|
309 | 'always',
|
310 | {
|
311 | objectsInObjects: false,
|
312 | arraysInObjects: false
|
313 | }
|
314 | ], // require or disallow padding inside curly braces - http://eslint.org/docs/rules/object-curly-spacing
|
315 | 'one-var': [
|
316 | 2,
|
317 | {
|
318 | uninitialized: 'always',
|
319 | initialized: 'never'
|
320 | }
|
321 | ], // require or disallow one variable declaration per function - http://eslint.org/docs/rules/one-var
|
322 | 'one-var-declaration-per-line': [
|
323 | 2,
|
324 | 'initializations'
|
325 | ], // require or disallow an newline around variable declarations - http://eslint.org/docs/rules/one-var-declaration-per-line
|
326 | 'operator-assignment': [
|
327 | 2,
|
328 | 'always'
|
329 | ], // require assignment operator shorthand where possible or prohibit it entirely - http://eslint.org/docs/rules/operator-assignment
|
330 | 'operator-linebreak': [
|
331 | 2,
|
332 | 'before'
|
333 | ], // enforce operators to be placed before or after line breaks - http://eslint.org/docs/rules/operator-linebreak
|
334 | 'padded-blocks': 0, // enforce padding within blocks - http://eslint.org/docs/rules/padded-blocks
|
335 | 'quote-props': [
|
336 | 2,
|
337 | 'consistent-as-needed'
|
338 | ], // require quotes around object literal property names - http://eslint.org/docs/rules/quote-props
|
339 | 'quotes': [
|
340 | 2,
|
341 | 'single'
|
342 | ], // specify whether backticks, double or single quotes should be used - http://eslint.org/docs/rules/quotes
|
343 | 'require-jsdoc': 0, // Require JSDoc comment - http://eslint.org/docs/rules/require-jsdoc
|
344 | 'semi': [
|
345 | 2,
|
346 | 'never'
|
347 | ], // require or disallow use of semicolons instead of ASI - http://eslint.org/docs/rules/semi
|
348 | 'semi-spacing': 2, // enforce spacing before and after semicolons - http://eslint.org/docs/rules/semi-spacing
|
349 | 'sort-imports': 0, // sort import declarations within module - http://eslint.org/docs/rules/sort-imports
|
350 | 'sort-vars': 0, // sort variables within the same declaration block - http://eslint.org/docs/rules/sort-vars
|
351 | 'space-before-blocks': 0, // require or disallow a space before blocks - http://eslint.org/docs/rules/space-before-blocks
|
352 | 'space-before-function-paren': [
|
353 | 2,
|
354 | 'never'
|
355 | ], // require or disallow a space before function opening parenthesis - http://eslint.org/docs/rules/space-before-function-paren
|
356 | 'space-in-parens': [
|
357 | 2,
|
358 | 'never'
|
359 | ], // require or disallow spaces inside parentheses - http://eslint.org/docs/rules/space-in-parens
|
360 | 'space-infix-ops': 2, // require spaces around operators - http://eslint.org/docs/rules/space-infix-ops
|
361 | 'space-unary-ops': 2, // require or disallow spaces before/after unary operators - http://eslint.org/docs/rules/space-unary-ops
|
362 | 'spaced-comment': [
|
363 | 2,
|
364 | 'always'
|
365 | ], // require or disallow a space immediately following the // or /* in a comment - http://eslint.org/docs/rules/spaced-comment
|
366 | 'wrap-regex': 2 // require regex literals to be wrapped in parentheses - http://eslint.org/docs/rules/wrap-regex
|
367 | }
|
368 | }
|