-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·83 lines (83 loc) · 1.89 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
module.exports = {
'parser': '@typescript-eslint/parser',
'extends': [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
],
'env': {
'browser': true,
'es6': true
},
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parserOptions': {
'ecmaFeatures': {
'jsx': true
},
'ecmaVersion': 2018,
'sourceType': 'module'
},
'plugins': [
'babel',
'import',
'react',
'react-hooks',
'jest',
'prettier',
],
'settings': {
'react': {
'version': 'detect',
},
},
'rules': {
'indent': 'off',
'@typescript-eslint/indent': ['error', 2],
'babel/no-invalid-this': 'error',
'babel/semi': 'warn',
'babel/no-unused-expressions': 'warn',
eqeqeq: ['error', 'always'],
curly: 'error',
'no-var': ['error'],
'object-curly-spacing': ['error', 'always'],
'no-console': ['error', { allow: ['error', 'warn'] }],
'quotemark': [true, 'single', 'jsx-double', 'avoid-template'],
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index'
],
'newlines-between': 'always'
}
],
'import/no-default-export': ['error', 'always'],
'prefer-const': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'prettier/prettier': [
'error',
{
semi: true,
useTabs: false,
tabWidth: 2,
printWidth: 120,
singleQuote: true,
bracketSpacing: true,
trailingComma: 'all'
}
],
}
};