-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.json
132 lines (132 loc) · 5.33 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
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"node": true
},
"plugins": [
"no-relative-import-paths",
"eslint-plugin-simple-import-sort",
"@typescript-eslint/eslint-plugin",
"eslint-plugin-unicorn",
"eslint-plugin-import",
"unused-imports"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "./tsconfig.eslint.json",
"warnOnUnsupportedTypeScriptVersion": false,
"allowAutomaticSingleRunInference": true
},
"rules": {
"default-case-last": "error",
"eqeqeq": "error",
"import/no-empty-named-blocks": "warn",
"import/no-named-default": "warn",
"import/no-useless-path-segments": "warn",
"import/no-webpack-loader-syntax": "error",
"no-bitwise": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "warn",
"no-constructor-return": "error",
"no-control-regex": "error",
"no-debugger": "warn",
"no-div-regex": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "warn",
"no-ex-assign": "warn",
"no-extra-bind": "warn",
"no-extra-boolean-cast": "warn",
"no-extra-label": "warn",
"no-global-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "warn",
"no-label-var": "error",
"no-misleading-character-class": "error",
"no-new-wrappers": "error",
"no-plusplus": "error",
"no-regex-spaces": "error",
"no-restricted-globals": ["error", "event", "name", "length", "closed"],
"no-restricted-imports": [
"error",
{
"patterns": ["src/maskbook/*", "@/maskbook/*"]
}
],
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "warn",
"no-unreachable-loop": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "warn",
"no-unused-vars": "off",
"no-useless-backreference": "error",
"no-useless-call": "warn",
"no-useless-catch": "warn",
"no-useless-concat": "warn",
"no-useless-escape": "warn",
"object-shorthand": "warn",
"prefer-const": "warn",
"prefer-numeric-literals": "warn",
"prefer-object-has-own": "warn",
"prefer-regex-literals": "warn",
"radix": "warn",
"spaced-comment": ["warn", "always", { "line": { "markers": ["/"] } }],
"unused-imports/no-unused-imports": "error",
"valid-typeof": "error",
"yoda": "warn",
"@typescript-eslint/array-type": ["warn", { "default": "array-simple" }],
"@typescript-eslint/await-thenable": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/dot-notation": "warn",
"@typescript-eslint/no-array-constructor": "warn",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-extra-non-null-assertion": "warn",
"@typescript-eslint/no-for-in-array": "warn",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-loop-func": "warn",
"@typescript-eslint/no-loss-of-precision": "error",
"@typescript-eslint/no-meaningless-void-operator": "warn",
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
"@typescript-eslint/no-this-alias": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/prefer-as-const": "warn",
"@typescript-eslint/prefer-enum-initializers": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/no-misused-new": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"no-relative-import-paths/no-relative-import-paths": [
"warn",
{
"prefix": "@",
"rootDir": "src"
}
]
}
}