-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
109 lines (109 loc) · 3.24 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:typescript-sort-keys/recommended"
],
"plugins": [
"sort-destructure-keys",
"sort-keys-fix",
"typescript-sort-keys",
"import"
],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "tsconfig.json"
},
"env": {
"es6": true,
"node": true,
"jest": true,
"commonjs": true
},
"rules": {
"no-var": "warn",
"semi": "warn",
"indent": ["warn", 2, { "SwitchCase": 1 }],
"no-multi-spaces": "warn",
"space-in-parens": "warn",
"no-multiple-empty-lines": "warn",
"prefer-const": "warn",
"no-use-before-define": "warn",
"max-len": ["warn", 120],
"import/order": [
"error",
{
"groups": [
"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": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"import/newline-after-import": ["error", { "count": 1 }],
"sort-imports": ["error", {
"ignoreCase": false,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": [
"none", "all", "multiple", "single"
],
"allowSeparatedGroups": true
}],
"import/no-relative-packages": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/class-name-casing": "off",
"@typescript-eslint/ban-ts-comment": [
"warn",
{
"ts-ignore": "allow-with-description",
"minimumDescriptionLength": 10
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"sort-destructure-keys/sort-destructure-keys": 2,
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/consistent-type-definitions": ["warn", "type"],
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"ignoreRestSiblings": true
}
],
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-floating-promises": "error",
"prefer-destructuring": ["warn"],
"prefer-template": "warn",
"object-shorthand": "warn",
"newline-after-var": ["warn", "always"],
"curly": "warn",
"sort-keys-fix/sort-keys-fix": "warn",
"@typescript-eslint/prefer-ts-expect-error": "error",
"new-cap": "off",
"no-console": "off",
"no-else-return": "error",
"no-eval": "error",
"no-mixed-operators": "off",
"no-nested-ternary": "error",
"no-param-reassign": "error",
"no-underscore-dangle": "off",
"no-unused-vars": "off",
"ods-use-this": "off"
}
}