forked from roseswang/ReactWorkshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
129 lines (122 loc) · 3.31 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
"root": true,
// See https://github.com/eslint/eslint
"parser": "babel-eslint",
"plugins": [
"react"
],
"parserOptions": {
"ecmaVersion": 2015,
"sourceType": "module",
"impliedStrict": true,
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"commonjs": true,
"mocha": true,
"node": true
},
"rules": {
"brace-style": [2, "1tbs"],
"comma-dangle": [2, "never"],
"comma-spacing": [2, { "before": false, "after": true }],
"consistent-return": 2,
"curly": [2, "all"],
"dot-location": [2, "property"],
"dot-notation": 1,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"indent": [2, 2, {"SwitchCase": 1}],
"jsx-quotes": [2, "prefer-double"],
"key-spacing": 1,
"keyword-spacing": 2,
"no-alert": 2,
"no-array-constructor": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-multi-spaces": 2,
"no-unsafe-negation": 2,
"no-new": 2,
"no-new-wrappers": 2,
"no-new-object": 2,
"no-obj-calls": 2,
"no-shadow": [2, {
"allow": [
# Allow shadowing of timers (allows using promisified timers)
"requestAnimationFrame", "setTimeout"
]
}],
"no-sparse-arrays": 2,
"no-template-curly-in-string": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-underscore-dangle": 0, // the key '_cId' breaks this rule
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"no-unused-expressions": 2,
"quotes": [2, "single"/*, {"avoidEscape": true, "allowTemplateLiterals": true}*/],
"semi": [2, "always"],
"strict": [2, "global"],
"symbol-description": 2,
"valid-jsdoc": 2,
"valid-typeof": 2,
"unicode-bom": 2,
// See https://github.com/yannickcr/eslint-plugin-react
// https://github.com/facebook/react/blob/master/.eslintrc
"react/display-name": 0,
"react/jsx-boolean-value": [2, "always"],
"react/jsx-closing-bracket-location": 0,
"react/jsx-curly-spacing": [2, "never", {"allowMultiline": true}],
"react/jsx-indent-props": [2, 2],
"react/jsx-max-props-per-line": 0,
"react/jsx-no-bind": [1, {"ignoreRefs": true}],
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-pascal-case": 2,
"react/jsx-sort-props": 0,
"react/jsx-sort-prop-types": 0,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-wrap-multilines": 2,
"react/no-danger": 1,
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-is-mounted": 2,
"react/no-multi-comp": 1,
"react/no-unknown-property": 1,
"react/prop-types": 2,
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": [2, {
order: [
'lifecycle',
'everything-else',
'/^on.+$/',
'rendering'
],
groups: {
rendering: [
'/^render.+$/',
'render'
]
}
}],
"space-before-blocks": 2,
"space-before-function-paren": [2, "never"],
"spaced-comment": [2, "always"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2
}
}