-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
100 lines (100 loc) · 3.35 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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"project": ["tsconfig.json"],
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"eslint-plugin-import",
"eslint-plugin-jsx-a11y",
"eslint-plugin-tsdoc"
],
"root": true,
"rules": {
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": ["error", { "ignoreRestSiblings": true, "varsIgnorePattern": "h" }],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-ignore": "allow-with-description" }],
"array-bracket-spacing": ["error", "never"],
"arrow-parens": ["error", "always"],
"arrow-spacing": ["error", { "before": true, "after": true }],
"brace-style": ["error", "1tbs"],
"comma-dangle": ["error", "always-multiline"],
"complexity": ["error"],
"curly": ["error", "all"],
"default-case": "error",
"func-call-spacing": ["error", "never"],
"func-style": ["error", "declaration"],
"function-call-argument-newline": ["error", "consistent"],
"import/no-unresolved": "error",
"import/order": [
"error",
{
"groups": [
"type",
"builtin", // Built-in imports (come from NodeJS native) go first
"external", // <- External imports
"internal", // <- Absolute imports
[
"sibling", "parent"
], // <- Relative imports, the sibling and parent types they can be mingled together
"index", // <- index imports
"unknown" // <- unknown
],
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"indent": ["error", 2, { "SwitchCase": 1 }],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"max-depth": ["error", {"max": 4}],
"max-len": ["error", { "code": 300 }],
"max-params": ["error", 4],
"newline-per-chained-call": "off",
"no-array-constructor": "error",
"no-await-in-loop": "error",
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-extra-bind": "error",
"no-magic-numbers": "off",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-nested-ternary": "error",
"no-trailing-spaces": "error",
"object-curly-spacing": ["error", "always"],
"operator-linebreak": ["error", "before", { "overrides": { "&&": "after" }}],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"sort-imports": [
"error",
{
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
"allowSeparatedGroups": false
}
],
"sort-keys": ["error", "asc"],
"space-before-function-paren": ["error", "never"]
},
"settings": {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
}
}
}
}