-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (78 loc) · 2.54 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
'plugin:import/warnings',
'plugin:import/errors',
'plugin:import/typescript',
],
settings: {
'import/resolver': {
[require.resolve('eslint-import-resolver-typescript')]: {},
node: {},
},
},
root: true,
env: {
node: true,
jest: true,
es6: true,
},
rules: {
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'prettier/prettier': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'no-console': 'error',
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'arrow-spacing': 'error',
'key-spacing': 'error',
'switch-colon-spacing': 'error',
'semi-spacing': 'error',
'comma-spacing': 'error',
'func-call-spacing': 'error',
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
'object-curly-spacing': ['error', 'always'],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/semi': ['error', 'always', { omitLastInOneLineBlock: true }],
'@typescript-eslint/padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'if' },
{ blankLine: 'always', prev: 'if', next: '*' },
{ blankLine: 'always', prev: '*', next: 'try' },
{ blankLine: 'always', prev: 'try', next: '*' },
{ blankLine: 'always', prev: '*', next: 'switch' },
{ blankLine: 'always', prev: 'switch', next: '*' },
{ blankLine: 'always', prev: '*', next: 'for' },
{ blankLine: 'always', prev: 'for', next: '*' },
{ blankLine: 'always', prev: '*', next: 'return' },
],
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
},
],
yoda: 'warn',
'import/newline-after-import': 'warn',
'import/no-cycle': 'off',
'import/order': 'warn',
'import/no-named-as-default-member': 'off',
},
};