-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
138 lines (138 loc) · 3.28 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
module.exports = {
env: {
es2021: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
},
settings: {
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
paths: ['node_modules/', 'node_modules/@types'],
},
},
},
plugins: ['jsdoc', '@typescript-eslint'],
extends: [
'airbnb-base',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
rules: {
radix: ['error', 'as-needed'],
strict: ['error', 'global'],
'no-plusplus': 0,
'no-underscore-dangle': 0,
'no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true,
},
],
'import/extensions': [
'off',
'ignorePackages',
{
ts: 'never',
},
],
'no-console': 0,
'import/order': 'error',
'jsdoc/check-alignment': 1,
'jsdoc/check-indentation': 1,
'jsdoc/check-param-names': 0,
'jsdoc/check-tag-names': 0,
'jsdoc/check-types': 1,
'jsdoc/check-values': 1,
'jsdoc/empty-tags': 1,
'jsdoc/implements-on-classes': 1,
'jsdoc/match-description': 1,
'jsdoc/newline-after-description': 0,
'jsdoc/no-bad-blocks': 1,
'jsdoc/no-defaults': 1,
'jsdoc/no-undefined-types': 0,
'jsdoc/require-description': 1,
'jsdoc/require-description-complete-sentence': 1,
'jsdoc/require-example': 0,
'jsdoc/require-file-overview': 0,
'jsdoc/require-hyphen-before-param-description': [1, 'never'],
'jsdoc/require-jsdoc': 0,
'jsdoc/require-param': 1,
'jsdoc/require-param-description': 1,
'jsdoc/require-param-name': 1,
'jsdoc/require-param-type': 1,
'jsdoc/require-returns': 1,
'jsdoc/require-returns-check': 1,
'jsdoc/require-returns-description': 1,
'jsdoc/require-returns-type': 1,
'jsdoc/valid-types': 1,
'no-cond-assign': [2, 'except-parens'],
'no-restricted-syntax': 0,
'no-param-reassign': 0,
'prettier/prettier': [
'error',
{
singleQuote: true,
parser: 'typescript',
},
],
'no-await-in-loop': 0,
'import/prefer-default-export': 'off',
'@typescript-eslint/ban-types': [
'error',
{
types: {
'{}': false,
},
extendDefaults: true,
},
],
},
overrides: [
{
files: ['**/*.test.js'],
env: {
jest: true,
},
plugins: ['jest'],
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
{
files: ['app/setupTests*'],
env: {
jest: true,
},
plugins: ['jest'],
},
{
files: ['**/*.test.js'],
env: {
jest: true,
},
plugins: ['jest'],
rules: {
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
],
}