forked from hallister/semantic-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
137 lines (133 loc) · 4.7 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
130
131
132
133
134
135
136
137
{
"parser": "babel-eslint",
//
// Many of these rules taken from https://gist.github.com/nkbt/9efd4facb391edbf8048
//
"rules": {
//
// Errors
//
"comma-dangle": 2,
"no-cond-assign": 2,
"no-console": 1, // disabled, will remove through webpack job
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-typeof": 2,
//
// Variables
//
"no-catch-shadow": 2, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)
"no-delete-var": 2, // disallow deletion of variables
"no-label-var": 2, // disallow labels that share a name with a variable
"no-shadow": 2, // disallow declaration of variables already declared in the outer scope
"no-shadow-restricted-names": 2, // disallow shadowing of names such as arguments
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
"no-undef-init": 2, // disallow use of undefined when initializing variables
"no-undefined": 2, // disallow use of undefined variable (off by default)
"no-unused-vars": 0, // disallow declaration of variables that are not used in the code
"no-use-before-define": 1, // disallow use of variables before they are defined
//
// Stylistic
//
"brace-style": 1,
"comma-spacing": [1, {"before": false, "after": true}],
"comma-style": [1, "last"],
"indent": [1, 4],
"key-spacing": [1, {"beforeColon": false, "afterColon": true}],
"no-lonely-if": 1,
"no-mixed-spaces-and-tabs": 1,
"no-multiple-empty-lines": [1, {"max": 2}],
"no-nested-ternary": 1,
"quote-props": [1, "as-needed"],
"quotes": [1, "single"],
"keyword-spacing": 1,
"space-before-blocks": [1, "always"],
"space-before-function-paren": [1, {"anonymous": "never", "named": "never"}],
"object-curly-spacing": [1, "always"],
"space-in-parens": [1, "never"],
"space-infix-ops": 1,
"space-unary-ops": [1, {"words": true, "nonwords": false}],
"spaced-comment": [1, "always"],
//
// ECMAScript 6
//
"no-var": 2,
"generator-star-spacing": [2, "before"],
//
// React
//
"jsx-quotes": [2, "prefer-double"],
"react/jsx-curly-spacing": [1, "never"],
"react/jsx-max-props-per-line": [1, {"maximum": 3}],
"react/jsx-boolean-value": 1,
"react/jsx-no-undef": 2,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 0,
"react/jsx-sort-prop-types": 0,
"react/jsx-sort-props": 0,
"react/jsx-indent-props": [0, 4],
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/jsx-closing-bracket-location": [1, { "nonEmpty": "tag-aligned", "selfClosing": "after-props"}],
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": [1, { "ignoreStateless": true }],
"react/no-danger": 1,
"react/no-unknown-property": 2,
"react/prop-types": [2, { "ignore": ["onClick", "children", "state", "component", "defaultClasses", "className"]}],
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/sort-comp": [2, {
"order": [
"lifecycle",
"/^on.+$/",
"rendering",
"everything-else"
],
"groups": {
"rendering": [
"/^render.+$/",
"render"
]
}
}],
"react/wrap-multilines": 2
},
"env": {
"es6": true,
"node": true,
"browser": true,
"mocha": true
},
"parser-options": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread ": true,
"jsx": true,
"sourceType": "module"
}
},
"plugins": [
"react"
]
}