-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc
153 lines (153 loc) · 4.67 KB
/
.eslintrc
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
{
"env": { "node": true, "es6": true },
"extends": [
"eslint:recommended"
],
"plugins": [
"@babel"
],
"rules": {
"dot-notation": "off",
"eqeqeq": "off",
"max-len": ["error", {
"code": 132,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"ignorePattern": "^\\s*debug\\(|^import.*"
}],
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-eval": "warn",
"no-fallthrough": "warn",
"no-unused-vars": "warn",
"no-undef": "error",
"no-unexpected-multiline": "error",
"object-curly-spacing": ["error", "always", {"objectsInObjects": false, "arraysInObjects": false}]
},
"ignorePatterns": [
"build/"
],
"overrides": [
{
"files": ["*.js"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true,
"legacyDecorators": true
},
"babelOptions": {
"configFile": "./babel.config.js"
}
},
"rules": {
"no-empty": "off"
}
},
{
"files": ["*.ts"],
"extends": [
"standard",
"standard-with-typescript"
],
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" },
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"standard"
],
"rules": {
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/consistent-type-assertions": ["error", {
"assertionStyle": "as",
"objectLiteralTypeAssertions": "allow-as-parameter"
}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/indent": ["error", 2, {
"SwitchCase": 1,
"MemberExpression": "off"
}],
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": ["error", {
"allow": ["arrowFunctions"]
}], // TODO
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true}],
"@typescript-eslint/no-invalid-void-type": ["error"],
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
"args": "after-used",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}],
"@typescript-eslint/prefer-ts-expect-error": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"@typescript-eslint/semi": ["warn", "always"],
"@typescript-eslint/strict-boolean-expressions": "off",
"brace-style": "off",
"camelcase": "off",
"comma-dangle": ["error", {
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "never",
"exports": "never",
"functions": "never"
}],
"curly": "off",
"func-call-spacing": "off",
"import/order": ["warn", {
"groups": [
["builtin", "external", "internal"],
"parent",
["sibling", "index"]
],
"newlines-between": "always-and-inside-groups",
"alphabetize": {
"order": "asc",
"caseInsensitive":true
}
}],
"no-case-declarations": "off",
"no-console": "warn",
"no-dupe-class-members": "off",
"no-extra-boolean-cast": "off",
"no-use-before-define": "off",
"no-useless-escape": "off",
"no-void": ["error", { "allowAsStatement": true }],
"operator-linebreak": "off",
"prefer-const": "warn",
"prefer-destructuring": ["error", {
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": true
}
},{
"enforceForRenamedProperties": false
}],
"prefer-promise-reject-errors": "off",
"prefer-template": "error",
"semi": "off",
"space-before-function-paren": "off"
}
}
]
}