-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
91 lines (91 loc) · 2.17 KB
/
.eslintrc.js
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
module.exports = {
parser: '@typescript-eslint/parser',
root: true,
extends: ['prettier', 'plugin:jest/recommended', 'plugin:import/recommended'],
plugins: ['@typescript-eslint', 'jest', 'prettier', 'unused-imports', 'import'],
env: {
'jest/globals': true,
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
},
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: {
arguments: false,
attributes: false,
},
},
],
},
},
],
rules: {
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
printWidth: 100,
endOfLine: 'auto',
semi: true,
arrowParens: 'always',
bracketSpacing: true,
tabWidth: 2,
},
],
'import/no-unresolved': [
0,
{
commonjs: true,
amd: true,
},
],
'import/no-cycle': 'error',
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/valid-expect': 'error',
'import/first': 'error',
'import/named': 'off',
'import/no-duplicates': 'error',
'import/newline-after-import': 'error',
'no-console': 'error',
'no-unused-expressions': [
1,
{
allowTernary: true,
},
],
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
},
};