This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
forked from theforeman/foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
192 lines (187 loc) · 5.82 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
{
"plugins": ["react"],
"env": {
"browser": true,
"es6": true,
"node": true,
"jasmine": true,
"jest": true
},
"globals": {
"document": false,
"escape": false,
"navigator": false,
"unescape": false,
"window": false,
"$": true,
"_": true,
"__": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": true,
"jsx": true
}
},
"rules": {
"block-scoped-var": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["error", { "properties": "always" }],
"comma-dangle": ["error", "never"],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"complexity": "off",
"consistent-return": "error",
"consistent-this": ["error", "self"],
"curly": "error",
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": ["error", {"allowPattern": "^[a-z]+(_[a-z]+)+$"}],
"eol-last": "error",
"eqeqeq": ["error", "smart"],
"func-names": "off",
"func-style": "off",
"generator-star-spacing": ["error", "both"],
"guard-for-in": "error",
"handle-callback-err": ["error", "^(err|error|anySpecificError)$" ],
"jsx-quotes": ["error", "prefer-double"],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"linebreak-style": ["error", "unix"],
"max-depth": ["error", 4],
"max-len": ["error", {
"code": 100,
"tabWidth": 2,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignorePattern": "^\\s*var\\s.+=\\s*require\\s*\\(/"
}],
"max-nested-callbacks": ["error", 5],
"max-params": ["error", 3],
"max-statements": ["error", 10, { "ignoreTopLevelFunctions": true }],
"new-cap": ["error", { "newIsCap": true, "capIsNew": false }],
"newline-after-var": ["error", "always"],
"new-parens": "error",
"no-alert": "warn",
"no-array-constructor": "error",
"no-bitwise": "off",
"no-caller": "error",
"no-case-declarations": "error",
"no-catch-shadow": "off",
"no-cond-assign": "error",
"no-console": "warn",
"no-constant-condition": "error",
"no-continue": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "off",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-eq-null": "off",
"no-eval": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": "off",
"no-extra-semi": "error",
"no-extra-strict": "off",
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-func-assign": "error",
"no-implied-eval": "error",
"no-inline-comments": "off",
"no-inner-declarations": ["error", "functions"],
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "off",
"no-lonely-if": "off",
"no-loop-func": "error",
"no-mixed-requires": "off",
"no-mixed-spaces-and-tabs": ["error", false],
"no-multi-spaces": "error",
"no-multi-str": "warn",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-path-concat": "off",
"no-plusplus": "off",
"no-process-env": "off",
"no-process-exit": "off",
"no-proto": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-modules": "off",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": "off",
"no-shadow-restricted-names": "error",
"no-spaced-func": "error",
"no-sparse-arrays": "error",
"no-sync": "off",
"no-ternary": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unused-expressions": "off",
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
"no-use-before-define": ["error", "nofunc"],
"no-var": "error",
"no-void": "off",
"no-warning-comments": "off",
"no-with": "error",
"one-var": "off",
"operator-assignment": "off",
"operator-linebreak": ["error", "after"],
"padded-blocks": "off",
"quote-props": "off",
"quotes": ["error", "single", {"avoidEscape": true}],
"radix": "error",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"semi": ["error", "always"],
"semi-spacing": "off",
"sort-vars": "off",
"keyword-spacing": ["error", {"before": true, "after": true}],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}],
"space-in-brackets": "off",
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"spaced-comment": ["error", "always"],
"strict": "off",
"use-isnan": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
"vars-on-top": "error",
"wrap-iife": ["error", "any"],
"wrap-regex": "off",
"yoda": ["error", "never"]
}
}