-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
66 lines (66 loc) · 1.77 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
module.exports = {
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
ecmaVersion: 2018,
},
ignorePatterns: ['.eslintrc.js'],
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
indent: ['off', 2],
quotes: [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: true },
],
semi: ['error', 'always'],
'eol-last': ['error', 'always'],
'no-console': 0,
'no-var': 'error',
eqeqeq: ['error', 'always'],
curly: ['error', 'all'],
'no-multiple-empty-lines': ['error', { max: 1 }],
'no-empty': ['error', { allowEmptyCatch: true }],
'prefer-arrow-callback': ['error'],
'require-await': 'error',
'no-case-declarations': 0,
'prefer-const': [
'error',
{
destructuring: 'all',
ignoreReadBeforeAssign: false,
},
],
'no-prototype-builtins': 'off',
'newline-after-var': ['error', 'always'],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-require-imports': ['error'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
varsIgnorePattern: '^_',
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'object-shorthand': 'error',
'no-useless-rename': 'error',
},
};