-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
61 lines (59 loc) · 1.44 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
const OFF = 0
const WARN = 1
const ERROR = 2
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:promise/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['promise', '@typescript-eslint'],
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.js', '.json'],
},
typescript: {},
},
},
rules: {
'import/extensions': [
ERROR,
'ignorePackages',
{
ts: 'never',
json: 'never',
js: 'never',
},
],
'@typescript-eslint/no-useless-constructor': ERROR,
'@typescript-eslint/no-empty-function': WARN,
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/explicit-module-boundary-types': OFF,
'@typescript-eslint/no-use-before-define': ERROR,
'@typescript-eslint/no-shadow': [ERROR],
'lines-between-class-members': [ERROR, 'always'],
'linebreak-style': [ERROR, 'unix'],
quotes: [ERROR, 'single'],
semi: [ERROR, 'never'],
'no-console': OFF,
'no-unused-expressions': WARN,
'no-use-before-define': OFF,
'no-restricted-syntax': OFF,
'no-shadow': OFF,
'no-plusplus': OFF,
'class-methods-use-this': ERROR,
'import/prefer-default-export': OFF,
},
}