-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
83 lines (81 loc) · 2.99 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
{
"root": true,
// "env": {
// "node": true,
// "jest": true
// },
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"tsconfigRootDir": ".",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"sonarjs",
"prettier",
"@typescript-eslint/eslint-plugin",
"simple-import-sort"
],
"extends": [
"eslint:recommended",
"airbnb-base",
"airbnb-typescript/base",
"plugin:vitest/recommended",
"plugin:sonarjs/recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
"ignorePatterns": ["**/node_modules/**", "dist/**", "**/vitest.*.ts"],
"rules": {
// These rules are for reference only.
//#region eslint
"no-console": "off",
"class-methods-use-this": "off",
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
"no-void": ["error", { "allowAsStatement": true }],
"spaced-comment": ["error", "always", { "line": { "markers": ["/", "#region", "#endregion"] } }],
//#endregion
//#region import
"import/no-default-export": "error",
"import/order": [
"error",
{
"groups": [["builtin", "external", "internal"]],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
"import/prefer-default-export": "off",
//#endregion
//#region @typescript-eslint
// "@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "angle-bracket" }],
// "@typescript-eslint/lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
// "@typescript-eslint/restrict-template-expressions": ["error", { "allowNumber": true }],
//#endregion
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-explicit-any": "off",
"simple-import-sort/imports": "error",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-base-to-string": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/no-unsafe-return": "off",
"sonarjs/no-duplicate-string": "off"
}
}