-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (55 loc) · 1.56 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
module.exports = {
env: {
es2021: true,
node: true,
jest: true,
},
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2021,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'airbnb-base',
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended'
],
plugins: [
'import',
],
rules: {
'import/extensions': [
'warn',
{
ts: true,
js: true,
json: false
},
],
'no-underscore-dangle': 'off',
'array-callback-return': 'off',
'newline-before-return': 'error',
'consistent-return': 'off',
'@typescript-eslint/naming-convention': 'off',
'no-else-return': ['error', { allowElseIf: false }],
'class-methods-use-this': 'off',
indent: ['error', 4, { SwitchCase: 1 }],
'@typescript-eslint/indent': ['error', 4, { SwitchCase: 1 }],
semi: ['error', 'never'],
'@typescript-eslint/semi': ['error', 'never'],
'no-multiple-empty-lines': ['error', { max: 1 }],
'max-len': 'off',
'new-cap': ['error', {
newIsCap: false,
capIsNew: false,
properties: true,
}],
'padded-blocks': ['error', 'never', { allowSingleLineBlocks: true }],
quotes: ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: true,
}],
'prefer-const': 'error',
},
}