-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
61 lines (52 loc) · 1.55 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
module.exports = {
env: {
browser: true,
es6: true,
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
typescript: './tsconfig.json',
node: {
paths: ['src'],
moduleDirectory: ['webpack', 'node_modules'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
ignorePatterns: ['.eslintrc.js', 'node_modules'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
plugins: ['import', '@typescript-eslint'],
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'eslint:recommended',
'prettier',
'prettier/babel',
],
rules: {
'object-curly-newline': ['off'],
'array-element-newline': ['off', 'consistent'],
'array-bracket-newline': ['error', 'consistent'],
'max-len': ['off'],
'no-multiple-empty-lines': ['error'],
'@typescript-eslint/naming-convention': ['off'],
'@typescript-eslint/indent': ['error', 2],
indent: ['error', 2, { SwitchCase: 1 }],
'operator-linebreak': ['error', 'before'],
'consistent-return': 'warn',
'lines-between-class-members': ['off', 'always', { exceptAfterSingleLine: true }],
'@typescript-eslint/lines-between-class-members': ['off'],
'no-console': ['off'],
'function-paren-newline': ['off'],
'implicit-arrow-linebreak': ['off'],
'object-curly-spacing': ['error', 'always'],
},
};