-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (48 loc) · 1.53 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'simple-import-sort',
],
extends: [
'eslint:recommended',
'react-app',
'plugin:@typescript-eslint/recommended',
],
'rules': {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'@typescript-eslint/semi': ['error', 'always'],
'brace-style': ['error', '1tbs'],
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': ['error', { 'before': false, 'after': true }],
'comma-style': [2, 'last'],
'consistent-return': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'jsx-quotes': ['error', 'prefer-single'],
'linebreak-style': [2, 'unix'],
'no-else-return': 2,
'object-curly-spacing': 'off', // disable in favor of typescript-eslint/object-curly-spacing
'prefer-const': 1,
'quotes': ['error', 'single'],
'semi': 'off', // disable in favor of typescript-eslint/semi
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'space-before-blocks': ['error', 'always'],
'space-before-function-paren': ['error', 'always'],
'space-in-parens': ['error', 'never'],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
}],
},
};