Skip to content

Commit ffa1257

Browse files
MB-47751: add initial eslint config
Change-Id: Ieb90684c63d02bdfcbd5fb986531186acc26e71f Reviewed-on: http://review.couchbase.org/c/ns_server/+/159029 Well-Formed: Build Bot <[email protected]> Tested-by: Pavel Blagodov <[email protected]> Reviewed-by: Pavel Blagodov <[email protected]>
1 parent bfe313b commit ffa1257

File tree

3 files changed

+1103
-2
lines changed

3 files changed

+1103
-2
lines changed

priv/public/ui/.eslintrc.json

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": "eslint:recommended",
7+
"parserOptions": {
8+
"ecmaVersion": 12,
9+
"sourceType": "module"
10+
},
11+
"rules": {
12+
"accessor-pairs": "error",
13+
"array-bracket-newline": "off",
14+
"array-bracket-spacing": [
15+
"error",
16+
"never"
17+
],
18+
"array-callback-return": "off",
19+
"array-element-newline": "off",
20+
"arrow-body-style": "off",
21+
"arrow-parens": "off",
22+
"arrow-spacing": "off",
23+
"block-scoped-var": "off",
24+
"block-spacing": "off",
25+
"brace-style": "off",
26+
"camelcase": "off",
27+
"capitalized-comments": "off",
28+
"class-methods-use-this": "off",
29+
"comma-dangle": "off",
30+
"comma-spacing": "off",
31+
"comma-style": [
32+
"error",
33+
"last"
34+
],
35+
"complexity": "off",
36+
"computed-property-spacing": [
37+
"error",
38+
"never"
39+
],
40+
"consistent-return": "off",
41+
"consistent-this": "off",
42+
"curly": "off",
43+
"default-case": "off",
44+
"default-case-last": "error",
45+
"default-param-last": "error",
46+
"dot-location": [
47+
"error",
48+
"property"
49+
],
50+
"dot-notation": "off",
51+
"eol-last": "error",
52+
"eqeqeq": "off",
53+
"func-call-spacing": "error",
54+
"func-name-matching": "off",
55+
"func-names": "off",
56+
"func-style": "off",
57+
"function-call-argument-newline": "off",
58+
"function-paren-newline": "off",
59+
"generator-star-spacing": "error",
60+
"grouped-accessor-pairs": "error",
61+
"guard-for-in": "off",
62+
"id-denylist": "error",
63+
"id-length": "off",
64+
"id-match": "error",
65+
"implicit-arrow-linebreak": "off",
66+
"indent": "off",
67+
"init-declarations": "off",
68+
"jsx-quotes": "error",
69+
"key-spacing": "off",
70+
"keyword-spacing": "off",
71+
"line-comment-position": "off",
72+
"linebreak-style": [
73+
"error",
74+
"unix"
75+
],
76+
"lines-around-comment": "off",
77+
"lines-between-class-members": "off",
78+
"max-classes-per-file": "off",
79+
"max-depth": "off",
80+
"max-len": "off",
81+
"max-lines": "off",
82+
"max-lines-per-function": "off",
83+
"max-nested-callbacks": "error",
84+
"max-params": "off",
85+
"max-statements": "off",
86+
"max-statements-per-line": "off",
87+
"multiline-comment-style": "off",
88+
"multiline-ternary": "off",
89+
"new-parens": "off",
90+
"newline-per-chained-call": "off",
91+
"no-alert": "error",
92+
"no-array-constructor": "error",
93+
"no-await-in-loop": "error",
94+
"no-bitwise": "off",
95+
"no-caller": "error",
96+
"no-confusing-arrow": "off",
97+
"no-console": "off",
98+
"no-constructor-return": "error",
99+
"no-continue": "off",
100+
"no-div-regex": "error",
101+
"no-duplicate-imports": "off",
102+
"no-else-return": "off",
103+
"no-empty": [
104+
"error",
105+
{
106+
"allowEmptyCatch": true
107+
}
108+
],
109+
"no-empty-function": "off",
110+
"no-eq-null": "off",
111+
"no-eval": "error",
112+
"no-extend-native": "error",
113+
"no-extra-bind": "off",
114+
"no-extra-label": "off",
115+
"no-extra-parens": "off",
116+
"no-floating-decimal": "off",
117+
"no-implicit-globals": "error",
118+
"no-implied-eval": "error",
119+
"no-inline-comments": "off",
120+
"no-invalid-this": "off",
121+
"no-iterator": "error",
122+
"no-label-var": "error",
123+
"no-lone-blocks": "error",
124+
"no-lonely-if": "off",
125+
"no-loop-func": "off",
126+
"no-loss-of-precision": "error",
127+
"no-magic-numbers": "off",
128+
"no-mixed-operators": "off",
129+
"no-multi-assign": "off",
130+
"no-multi-spaces": "off",
131+
"no-multi-str": "error",
132+
"no-multiple-empty-lines": "off",
133+
"no-negated-condition": "off",
134+
"no-nested-ternary": "off",
135+
"no-new": "error",
136+
"no-new-func": "off",
137+
"no-new-object": "error",
138+
"no-new-wrappers": "off",
139+
"no-nonoctal-decimal-escape": "error",
140+
"no-octal-escape": "error",
141+
"no-param-reassign": "off",
142+
"no-plusplus": "off",
143+
"no-promise-executor-return": "error",
144+
"no-proto": "error",
145+
"no-restricted-exports": "error",
146+
"no-restricted-globals": "error",
147+
"no-restricted-imports": "error",
148+
"no-restricted-properties": "error",
149+
"no-restricted-syntax": "error",
150+
"no-return-assign": "off",
151+
"no-return-await": "error",
152+
"no-script-url": "error",
153+
"no-self-assign": [
154+
"error",
155+
{
156+
"props": false
157+
}
158+
],
159+
"no-self-compare": "off",
160+
"no-sequences": "off",
161+
"no-shadow": "off",
162+
"no-tabs": [
163+
"error",
164+
{
165+
"allowIndentationTabs": true
166+
}
167+
],
168+
"no-template-curly-in-string": "error",
169+
"no-ternary": "off",
170+
"no-throw-literal": "off",
171+
"no-trailing-spaces": "error",
172+
"no-undef-init": "error",
173+
"no-undefined": "off",
174+
"no-underscore-dangle": "off",
175+
"no-unmodified-loop-condition": "error",
176+
"no-unneeded-ternary": [
177+
"error",
178+
{
179+
"defaultAssignment": true
180+
}
181+
],
182+
"no-unreachable-loop": "off",
183+
"no-unsafe-optional-chaining": "error",
184+
"no-unused-expressions": "off",
185+
"no-use-before-define": "off",
186+
"no-useless-backreference": "error",
187+
"no-useless-call": "off",
188+
"no-useless-computed-key": "error",
189+
"no-useless-concat": "error",
190+
"no-useless-constructor": "off",
191+
"no-useless-rename": "error",
192+
"no-useless-return": "off",
193+
"no-var": "off",
194+
"no-void": "off",
195+
"no-warning-comments": "off",
196+
"no-whitespace-before-property": "error",
197+
"nonblock-statement-body-position": [
198+
"error",
199+
"any"
200+
],
201+
"object-curly-newline": "off",
202+
"object-curly-spacing": "off",
203+
"object-property-newline": "off",
204+
"object-shorthand": "off",
205+
"one-var": "off",
206+
"one-var-declaration-per-line": "off",
207+
"operator-assignment": "off",
208+
"operator-linebreak": "off",
209+
"padded-blocks": "off",
210+
"padding-line-between-statements": "error",
211+
"prefer-arrow-callback": "off",
212+
"prefer-const": "off",
213+
"prefer-destructuring": "off",
214+
"prefer-exponentiation-operator": "off",
215+
"prefer-named-capture-group": "off",
216+
"prefer-numeric-literals": "error",
217+
"prefer-object-spread": "off",
218+
"prefer-promise-reject-errors": "error",
219+
"prefer-regex-literals": "error",
220+
"prefer-rest-params": "off",
221+
"prefer-spread": "off",
222+
"prefer-template": "off",
223+
"quote-props": "off",
224+
"quotes": "off",
225+
"radix": "off",
226+
"require-atomic-updates": "off",
227+
"require-await": "error",
228+
"require-unicode-regexp": "off",
229+
"rest-spread-spacing": [
230+
"error",
231+
"never"
232+
],
233+
"semi": "off",
234+
"semi-spacing": "off",
235+
"semi-style": [
236+
"error",
237+
"last"
238+
],
239+
"sort-keys": "off",
240+
"sort-vars": "off",
241+
"space-before-blocks": "off",
242+
"space-before-function-paren": "off",
243+
"space-in-parens": "off",
244+
"space-infix-ops": "off",
245+
"space-unary-ops": "off",
246+
"spaced-comment": "off",
247+
"strict": "off",
248+
"switch-colon-spacing": [
249+
"error",
250+
{
251+
"after": true,
252+
"before": false
253+
}
254+
],
255+
"symbol-description": "error",
256+
"template-curly-spacing": [
257+
"error",
258+
"never"
259+
],
260+
"template-tag-spacing": "error",
261+
"unicode-bom": [
262+
"error",
263+
"never"
264+
],
265+
"vars-on-top": "off",
266+
"wrap-iife": "off",
267+
"wrap-regex": "off",
268+
"yield-star-spacing": "error",
269+
"yoda": "off"
270+
}
271+
}

0 commit comments

Comments
 (0)