forked from dcos/dcos-ui
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
167 lines (159 loc) · 4.84 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
{
"ecmaFeatures": {
"jsx": true,
"modules": true,
"sourceType": "module"
},
"env": {
"browser": true,
"jasmine": true,
"node": true,
"es6": true
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"plugins": [
"react"
],
"globals": {
"jest": true,
"ActiveXObject": true,
"Dygraph": true
},
"extends": "airbnb",
"rules": {
"arrow-parens": ["error", "always"],
"eqeqeq": ["error", "smart"],
"quotes": ["error", "single"],
"indent": ["error", 2, {"SwitchCase": 1}],
"camelcase": ["off", {"properties": "never"}],
// "camelcase": ["error", {"properties": "always"}], This causes errors with mixin properties
"comma-dangle": ["error", "never"],
"strict": ["error", "never"], // <-- fix
"no-mixed-operators": [2, {
"groups": [
["+", "-", "*", "/", "%", "**"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": true
}],
"no-mixed-spaces-and-tabs": "error",
"no-new": "off",
"no-trailing-spaces": ["error", { "skipBlankLines": false }],
"no-underscore-dangle": "off",
"no-unused-vars": ["error", {"args": "after-used", "argsIgnorePattern": "PluginSDK"}],
"no-use-before-define": "off",
"no-multiple-empty-lines": ["error", {"max": 1}],
"react/jsx-filename-extension": "off",
"keyword-spacing": ["error"],
"semi": ["error"],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", {
"anonymous": "always", "named": "never"
}],
"spaced-comment": ["error", "always"],
// "max-len": ["error", 80, 4], TODO: DCOS-914
"valid-jsdoc": ["error", {
"requireReturn": false,
"requireParamDescription": false
}],
// Airbnb overwrites
"import/no-extraneous-dependencies": "off",
"react/no-find-dom-node": "off",
"prefer-spread": "off",
"space-unary-ops": "off",
"operator-assignment": "off",
"object-property-newline": "off",
"react/jsx-no-target-blank": "off",
"react/no-string-refs": "off",
"jsx-a11y/label-has-for": "off",
"react/require-extension": "off",
"no-void": "off",
"react/self-closing-comp": "off",
"react/no-render-return-value": "off",
"no-extra-boolean-cast": "off",
"react/no-unknown-property": "off",
"no-var": "off",
"arrow-body-style": "off",
"object-curly-spacing": "off",
"react/jsx-closing-bracket-location": "off",
"prefer-rest-params": "off",
"prefer-arrow-callback": "off",
"no-param-reassign": "off",
"prefer-const": "off",
"vars-on-top": "off",
"prefer-template": "off",
"no-else-return": "off",
"space-infix-ops": "off",
"array-callback-return": "off",
"consistent-return": "off",
"quote-props": "off",
"no-restricted-syntax": "off",
"padded-blocks": "off",
"import/no-unresolved": "off",
"no-dupe-keys": "off",
"newline-per-chained-call": "off",
"one-var-declaration-per-line": "off",
"one-var": "off",
"no-shadow": "off",
"key-spacing": "off",
"no-dupe-class-members": "off",
"radix": "off",
"no-throw-literal": "off",
"wrap-iife": "off",
"no-extra-semi": "off",
"yoda": "off",
"default-case": "off",
"global-require": "off",
"no-case-declarations": "off",
"max-len": "off",
"no-useless-constructor": "off",
"no-return-assign": "off",
"react/jsx-indent": "off",
"react/sort-comp": "off",
"react/prefer-es6-class": "off",
"react/jsx-boolean-value": "off",
"arrow-spacing": "off",
"no-empty": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-no-bind": "off",
"react/prefer-stateless-function": "off",
"no-new-wrappers": "off",
"react/jsx-space-before-closing": "off",
"react/jsx-indent-props": "off",
"jsx-a11y/img-has-alt": "off",
"space-in-parens": "off",
"new-cap": "off",
"no-extra-label": "off",
"no-labels": "off",
"func-names": "off",
"no-console": "off",
"no-inner-declarations": "off",
"dot-notation": "off",
"react/jsx-equals-spacing": "off",
"react/no-is-mounted": "off",
"no-undef": "off",
"no-floating-decimal": "off",
"no-unreachable": "off",
// React plugin
"react/jsx-quotes": "off",
"react/jsx-no-undef": "error",
"react/jsx-uses-vars": "error",
"react/jsx-sort-props": "off",
"react/jsx-sort-prop-types": ["off", {"ignoreCase": true}],
"react/no-did-mount-set-state": "error",
"react/no-did-update-set-state": "error",
"react/no-multi-comp": "error",
"react/prop-types": "off",
// "react/prop-types": "error", This causes errors with many
"react/react-in-jsx-scope": "error"
}
}