-
Notifications
You must be signed in to change notification settings - Fork 379
/
.eslintrc.json
169 lines (169 loc) · 3.76 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
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
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"settings": {
"react": {
"version": "17"
}
},
"plugins": [
"react",
"@typescript-eslint",
"surveyjs"
],
"rules": {
"surveyjs/no-test-only": 2,
"surveyjs/no-test-debug": 2,
"surveyjs/no-imports-from-entries": 2,
"no-console": 2, // Remember, this means error!
"indent": [
"error",
2,
{
"SwitchCase": 1,
"MemberExpression": 1,
"CallExpression": {
"arguments": 1
}
}
],
"no-trailing-spaces": [
"error",
{
"ignoreComments": true
}
],
"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",
"double",
{
"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"],
"@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",
"@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",
"windows"
],
"react/no-is-mounted": "off"
}
}