-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
64 lines (64 loc) · 1.79 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
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["import", "unused-imports", "prettier"],
ignorePatterns: ["**/dist/*"],
env: {
browser: true,
es2021: true,
},
extends: [
"eslint:recommended",
"prettier",
"plugin:import/recommended",
"plugin:@typescript-eslint/recommended",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"import/no-cycle": ["error", { allowUnsafeDynamicCyclicDependency: true }],
"import/no-unresolved": "error",
"comma-dangle": ["error", "always-multiline"],
eqeqeq: ["warn", "smart"],
indent: ["error", 2, { SwitchCase: 1 }],
"eol-last": "error",
semi: ["error", "always"],
"no-unused-vars": ["error", { vars: "all", args: "none", ignoreRestSiblings: false }],
"unused-imports/no-unused-imports-ts": ["error"],
"comma-spacing": ["error", { before: false, after: true }],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"import/newline-after-import": ["error", { count: 1, considerComments: true }],
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/ban-types": "warn",
"import/named": "off",
"@typescript-eslint/no-empty-function": "off",
"react-hooks/exhaustive-deps": "off",
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"prettier/prettier": "error",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./src",
},
},
},
};