-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
82 lines (82 loc) · 2.3 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: ["eslint:recommended"],
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
parserOptions: {
project: ["./tsconfig.json"],
},
rules: {
"@typescript-eslint/require-await": ["off"],
"@typescript-eslint/no-use-before-define": ["error", {
"typedefs": false,
"enums": false,
"functions": false,
classes: false,
allowNamedExports: false,
}],
"no-use-before-define": ["off"],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unused-vars": ["warn", {
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_"
}],
},
}
],
plugins: ["@typescript-eslint"],
ignorePatterns: [
"node_modules/**",
"build/**",
"dist/**",
"NetscriptDefinitions.d.ts"
],
rules: {
"no-multi-spaces": ["error"],
quotes: ["error", "double"],
semi: ["error", "always"],
indent: ["error", "tab"],
eqeqeq: ["warn"],
camelcase: ["error"],
"no-fallthrough": ["warn"],
"no-unused-vars": ["warn", {
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_"
}],
"no-constant-condition": ["off"],
"no-case-declarations": ["off"],
"no-constructor-return": ["error"],
"no-dupe-else-if": ["error"],
"no-inner-declarations": ["warn"],
"no-this-before-super": ["error"],
"no-unmodified-loop-condition": ["warn"],
"no-unreachable-loop": ["warn"],
"no-use-before-define": ["error", { functions: false,
classes: false }],
"arrow-body-style": ["error", "as-needed"],
"block-scoped-var": ["error"],
"no-multiple-empty-lines": ["error", { max: 1 }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }]
},
};