-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
129 lines (129 loc) · 4.57 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
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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"preact",
"prettier/@typescript-eslint"
],
"ignorePatterns": ["*.d.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json"],
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint"],
"env": {
"browser": true
},
"rules": {
"complexity": ["error", 7],
"eqeqeq": "error",
"yoda": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error", { "enums": false }],
"block-spacing": "error",
"brace-style": "off",
"@typescript-eslint/brace-style": "error",
"camelcase": "error",
"capitalized-comments": "error",
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": "error",
"func-style": "error",
"implicit-arrow-linebreak": "error",
"indent": "off",
"@typescript-eslint/indent": ["error", 2],
"jsx-quotes": "error",
"keyword-spacing": "error",
"line-comment-position": "error",
"lines-between-class-members": "error",
"max-depth": ["error", 3],
"max-lines-per-function": ["error", 50],
"max-statements-per-line": "error",
"multiline-comment-style": "error",
"multiline-ternary": ["error", "always-multiline"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-nested-ternary": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-newline": ["error"],
"object-curly-spacing": ["error", "always"],
"one-var-declaration-per-line": "error",
"operator-linebreak": ["error"],
"padded-blocks": ["error", "never"],
"quotes": "off",
"@typescript-eslint/quotes": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "always"],
"semi-spacing": "error",
"semi-style": "error",
"space-before-blocks": "error",
"space-in-parens": "error",
"space-infix-ops": "error",
"spaced-comment": "error",
"switch-colon-spacing": "error",
"arrow-body-style": "error",
"arrow-parens": "error",
"arrow-spacing": "error",
"no-confusing-arrow": "error",
"no-duplicate-imports": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
"no-var": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-template": "error",
"template-curly-spacing": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true }
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "explicit" }
],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used",
"varsIgnorePattern": "^(h)$",
"caughtErrors": "all"
}
],
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error"
}
}