-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
128 lines (122 loc) · 4.84 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
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
// "plugin:import/errors",
// "plugin:import/warnings",
// "plugin:import/typescript"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
//"import"
],
"rules": {
//auto fix rules
// sub group: white scape formatting
"indent": ["error", 4, { "SwitchCase": 1, "MemberExpression": 1, "CallExpression": { "arguments": 1 } }],
"no-trailing-spaces": "error",
"no-multi-spaces": "error",
"block-spacing": "error",
"comma-spacing": "error",
"key-spacing": "error",
"semi-spacing": "error",
"object-curly-spacing": ["error", "always"],
"space-before-blocks": ["error", "always"],
"space-in-parens": ["error", "never"],
"array-bracket-spacing": ["error", "never"],
"computed-property-spacing": "error",
"keyword-spacing": ["error", {
"overrides": {
"if": { "after": false },
"for": { "after": false },
"while": { "after": false },
"switch": { "after": false },
//"this": { "after": false, "before": false },
"new": { "before": false },
"function": { "after": false, "before": false },
"catch": { "after": false }
}
}],
"no-multiple-empty-lines": [ "error", { "max": 1 } ],
"no-whitespace-before-property": "error",
// sub group: semicolons
"semi": ["error", "always"], "semi": "error",
"no-extra-semi": ["error"],
"@typescript-eslint/member-delimiter-style": ["error",
{
"multiline": {
"delimiter": "comma",
"requireLast": true
},
"singleline": {
"delimiter": "comma",
"requireLast": false
},
"overrides": {
"interface": {
"multiline": {
"delimiter": "semi",
"requireLast": true
}
}
}
}
],
"no-case-declarations": "off",
"quotes": ["error", "single", { "avoidEscape": true }],
"no-useless-escape": "off",
// group: add in future
"@typescript-eslint/no-var-requires": "off", // TODO add ignores
"no-unexpected-multiline": "off",
"no-constant-condition": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/class-name-casing": "off",
"@typescript-eslint/camelcase": "off",
"no-extra-boolean-cast": "off",
//sub group: js native functions
"no-prototype-builtins": "off",
"prefer-spread": "off",
//sub group: var definition:
"no-var": "off",
"prefer-const": "off",
"@typescript-eslint/no-use-before-define": "off",
"no-unsafe-finally": "off",
//"curly": [ "error", "multi-line", "consistent" ],
//"eqeqeq": ["error", "allow-null"],
"no-fallthrough": "off",
"@typescript-eslint/no-unused-vars": "off",
// group: add in very far future
//"no-eval": "error",
//"no-extend-native": "error",
"@typescript-eslint/interface-name-prefix": "off",
"prefer-rest-params": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/no-inferrable-types": "off",
// group: usless rules
"no-empty": "off",
"no-self-assign": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-types": "off",
// group: ok
//"@typescript-eslint/consistent-type-assertions": [ "error", { "assertionStyle": "angle-bracket" }],
"linebreak-style": "off"
//spellcheck/spell-checker
}
}