-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
69 lines (69 loc) · 1.74 KB
/
.eslintrc.cjs
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
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:import/recommended',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: true,
},
plugins: ['@typescript-eslint', 'unused-imports', 'import'],
root: true,
settings: {
'import/resolver': {
typescript: true,
node: true,
},
},
rules: {
'@typescript-eslint/no-unused-vars': 'off', // for unused imports
'import/no-duplicates': 'error',
'import/order': [
'error',
{
alphabetize: {
caseInsensitive: true,
order: 'asc',
},
groups: ['builtin', 'external', 'internal'],
'newlines-between': 'always',
pathGroups: [
{
pattern: 'wildebeest/**',
group: 'internal',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'no-var': 'error',
'prefer-const': 'error',
'prefer-spread': 'error',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': 'warn',
/*
Note: the following rules have been set to off so that linting
can pass with the current code, but we need to gradually
re-enable most of them
*/
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/restrict-plus-operands': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'no-mixed-spaces-and-tabs': 'off',
},
overrides: [
{
files: ['*.test.ts'],
rules: {
'@typescript-eslint/require-await': 'warn',
},
},
],
}