-
Notifications
You must be signed in to change notification settings - Fork 84
/
.eslintrc
86 lines (86 loc) · 2.34 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
{
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"ignorePatterns": ["./shared", "./frontend"],
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"_": true
},
"parserOptions": {
"ecmaVersion": 2018
},
"overrides": [
{
"files": ["*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"modules": true
},
"project": "tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"import",
"simple-import-sort",
"typesafe"
],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
// Rules for auto sort of imports
"simple-import-sort/imports": [
"error",
{
"groups": [
// Side effect imports.
["^\\u0000"],
// Packages.
// Things that start with a letter (or digit or underscore), or
// `@` followed by a letter.
["^@?\\w"],
// Root imports
["^(src)(/.*|$)"],
["^(tests)(/.*|$)"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"]
]
}
],
"sort-imports": "off",
"import/order": "off",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"@typescript-eslint/no-floating-promises": 2,
"@typescript-eslint/no-unused-vars": 2,
"typesafe/no-throw-sync-func": "error"
}
},
{
"files": ["**/*.spec.ts", "**/__tests__/**/*.ts"],
"extends": ["plugin:jest/recommended"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
},
{
"files": ["*.ts", "*.js"],
"excludedFiles": ["**/*.spec.ts", "**/__tests__/**/*.ts"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "error"
}
}
],
"rules": {
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"no-console": "warn"
}
}