forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
88 lines (87 loc) · 3.02 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2021,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint"],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["build/*", "src/types/*", "src/api/*", "snowpack.config.js"],
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"no-console": "error",
"curly": ["error", "multi-line", "consistent"],
"eqeqeq": ["error", "always"],
"no-eval": "error",
"no-useless-return": "error",
"yoda": ["error", "never", { "exceptRange": true }],
"no-duplicate-imports": "error",
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"implicit-arrow-linebreak": ["error", "beside"],
"no-nested-ternary": "error",
"no-unneeded-ternary": "error",
"no-negated-condition": "error",
"one-var": ["error", "never"],
"no-else-return": ["error", { "allowElseIf": false }],
"no-dupe-else-if": "error",
"no-lonely-if": "error",
"eol-last": ["error", "always"],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/no-array-index-key": "error",
"react/no-multi-comp": ["error", { "ignoreStateless": true }],
"react/no-this-in-sfc": "error",
"react/no-unstable-nested-components": "error",
"react/jsx-no-literals": "error",
"react/jsx-pascal-case": "error",
"react/prop-types": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description",
"minimumDescriptionLength": 3
}
],
"@typescript-eslint/array-type": ["error", { "default": "array" }],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-member-access": "off"
},
"reportUnusedDisableDirectives": true
}