forked from surveyjs/survey-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
122 lines (117 loc) · 3.53 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"vue",
"react",
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:vue/essential"
],
"rules": {
"no-console": 2, // Remember, this means error!
"indent": ["error", 2, { "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", "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"
]
}
}