-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc-codebase
76 lines (66 loc) · 1.94 KB
/
.eslintrc-codebase
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
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"ecmaFeatures": {
"jsx": true,
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"defaultParams": true,
"forOf": true,
"generators": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"superInFunctions": true,
"templateStrings": true,
"unicodeCodePointEscapes": true
},
"plugins": [
"react"
],
"env": {
"browser": true
},
"globals": {
"module": true, // CommonJS module
"require": true, // CommonJS require
"React": true, // ReactJs
"fetch": true // Fetch js
},
"rules": {
// ESLint Rules:
// http://eslint.org/docs/rules/
// Possible Errors
"no-console": 0,
"block-scoped-var": 2,
// Best Practices
"complexity": [1, 4],
"no-eq-null": 2,
"no-self-compare": 2,
// Strict Mode
"strict": 0, // Since it's added automatically by strict-loader
// Stylistic issues
"indent": [2, 2, { "indentSwitchCase": true }],
"consistent-this": [2, "self"],
"func-names": 2,
"no-lonely-if": 2,
"no-unused-vars" : 1,
"no-multiple-empty-lines": 2,
"no-nested-ternary": 2,
"no-underscore-dangle": 1,
"quotes": [2, "single", "avoid-escape"],
"space-after-keywords": 2,
"space-before-blocks": 2,
"space-before-function-parentheses": 2,
"spaced-line-comment": 2,
"space-unary-ops": 2,
// Legacy
"max-len": [2, 120],
// React
// https://github.com/yannickcr/eslint-plugin-react
"react/jsx-quotes": [2, "single"]
}
}