-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
104 lines (104 loc) · 2.73 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
parser: '@typescript-eslint/parser',
env: {
es6: true,
browser: true,
node: true,
jest: true,
},
globals: {},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
sourceType: 'module',
project: ['./tsconfig.eslint.json'],
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'prettier/prettier': [
1,
{
singleQuote: true,
endOfLine: 'auto',
semi: false,
},
],
camelcase: [2, { properties: 'never' }],
curly: [2, 'multi-line'],
indent: [2, 2, { SwitchCase: 1 }],
quotes: [2, 'single'],
semi: [2, 'never'],
eqeqeq: 2,
yoda: 2,
'block-spacing': 2,
'computed-property-spacing': 2,
'comma-dangle': [
2,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
},
],
'func-call-spacing': 2,
'eol-last': 2,
'no-empty': [2, { allowEmptyCatch: true }],
'no-undefined': 2,
'no-use-before-define': [2, 'nofunc'],
'no-multi-assign': 2,
'no-useless-concat': 2,
'no-useless-return': 2,
'no-shadow-restricted-names': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-unused-vars': 1,
'no-console': 1,
'no-useless-constructor': 1,
'no-constant-condition': [2, { checkLoops: false }],
'no-duplicate-imports': [2, { includeExports: true }],
'no-useless-computed-key': 2,
'no-useless-rename': 2,
'no-var': 2,
'space-before-blocks': 2,
'space-in-parens': 2,
'space-infix-ops': 2,
'space-unary-ops': [2, { words: true, nonwords: false }],
'space-before-function-paren': [
2,
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'template-tag-spacing': 2,
'max-len': [
2,
{
code: 100,
tabWidth: 2,
ignoreStrings: true,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
'object-shorthand': 2,
'object-curly-spacing': [2, 'always'],
'prefer-const': 2,
'prefer-arrow-callback': 2,
'template-curly-spacing': [2, 'never'],
},
}