-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
63 lines (60 loc) · 3.66 KB
/
.eslintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6, // es6
"sourceType": "module", // use modules
"ecmaFeatures": {
"jsx": true, // react
"experimentalObjectRestSpread": true // ...
}
},
"plugins": [
"react"
],
// 0 - off, 1 - warning, 2 - error
"rules": {
// doc
"valid-jsdoc": 1, // enforce valid JSDoc comments
// syntax
"indent": [2, 2], // enforce consistent indentation
"no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation
"jsx-quotes": 2, // enforce the consistent use of either double or single quotes in JSX attributes
"no-multiple-empty-lines": 2, // disallow multiple empty lines
"no-confusing-arrow": 2, // disallow arrow functions where they could be confused with comparisons
// code
"no-const-assign": 2, // disallow reassigning const variables
"no-dupe-class-members": 2, // disallow duplicate class members
"no-duplicate-imports": 2, // disallow duplicate module imports
"no-unreachable": 2, // disallow unreachable code after return, throw, continue, and break statements
"no-unused-vars": 1, // disallow unused variables
"no-unneeded-ternary": 2, // disallow ternary operators when simpler alternatives exist
"no-extra-bind": 2, // disallow unnecessary calls to .bind()
"no-case-declarations": 2, // disallow lexical declarations in case clauses
"no-fallthrough": 2, // disallow fallthrough of case statements
"no-implicit-globals": 2, // disallow var and named function declarations in the global scope
"no-invalid-this": 2, // disallow this keywords outside of classes or class-like objects
"no-loop-func": 1, // disallow function declarations and expressions inside loop statements
"no-new-wrappers": 2, // disallow new operators with the String, Number, and Boolean objects
"no-param-reassign": 2, // disallow reassigning function parameters
"no-redeclare": 2, // disallow var redeclaration
"no-self-compare": 2, // disallow comparisons where both sides are exactly the same
"no-self-assign": 2, // disallow assignments where both sides are exactly the same
"no-magic-numbers": 1, // disallow magic numbers
"no-unmodified-loop-condition": 2, // disallow unmodified loop conditions
"no-unused-expressions": 2, // disallow unused expressions
"no-sequences": 2, // disallow comma operators
"no-throw-literal": 2, // disallow throwing literals as exceptions
"no-shadow": 2, // disallow var declarations from shadowing variables in the outer scope
"no-use-before-define": 1, // disallow the use of variables before they are defined
"no-process-exit": 1, // disallow the use of process.exit()
"no-this-before-super": 2, // disallow this/super before calling super() in constructors
"no-useless-constructor": 2, // disallow unnecessary constructors
"radix": 2, // enforce the consistent use of the radix argument when using parseInt()
"yoda": 2, // require or disallow “Yoda” conditions
"prefer-template": 1, // require template literals instead of string concatenation
"array-callback-return": 2, // enforce return statements in callbacks of array methods
"curly": 2, // enforce consistent brace style for all control statements
"consistent-return": 1, // require return statements to either always or never specify values
"vars-on-top": 2 // require var declarations be placed at the top of their containing scope
}
}