-
Notifications
You must be signed in to change notification settings - Fork 34
/
.eslintrc.js
80 lines (79 loc) · 2.37 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
const path = require('path')
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 9,
sourceType: 'module',
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'promise', 'prettier'],
overrides: [
{
files: ['*.ts'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'eslint-config-prettier',
],
parserOptions: {
project: path.join(__dirname, 'tsconfig.json'),
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/space-before-function-paren': [
'error',
{ anonymous: 'always', named: 'never', asyncArrow: 'always' },
],
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
},
},
],
extends: [
'eslint:recommended',
'airbnb-base',
'plugin:promise/recommended',
'eslint-config-prettier',
],
env: {
es6: true,
jest: true,
},
rules: {
'comma-dangle': ['error', 'always-multiline'],
'handle-callback-err': ['error', '^(err|error)$'],
'no-catch-shadow': 'error',
'no-underscore-dangle': 'off',
'object-curly-spacing': ['error', 'always'],
'max-classes-per-file': 'off',
'no-unused-vars': 'off',
'no-multi-assign': 'off',
'lines-between-class-members': 'off',
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'no-shadow': 'off',
'prefer-destructuring': 'off',
'no-continue': 'off',
'no-use-before-define': 'off',
'no-dupe-class-members': 'off',
'func-names': 'off',
'space-before-function-paren': 'off',
'no-lonely-if': 'off',
'no-param-reassign': ['error', { props: false }],
'no-redeclare': 'off',
'prettier/prettier': 'warn',
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
},
}