-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
100 lines (100 loc) · 2.59 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:@next/next/recommended'
],
plugins: ['@typescript-eslint', 'import', 'react-hooks'],
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
modules: true
},
project: ['./tsconfig.eslint.json', './tsconfig.json'],
tsconfigRootDir: __dirname
},
env: {
browser: true,
node: true,
es6: true,
jest: true
},
settings: {
react: {
version: 'detect'
}
},
rules: {
'no-mixed-spaces-and-tabs': 'error',
'@typescript-eslint/indent': 'off',
'no-undefined': 'error',
'no-undef-init': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'yield-star-spacing': 'error',
'no-eq-null': 'error',
eqeqeq: 'error',
yoda: 'error',
'@typescript-eslint/no-explicit-any': 'error',
'no-var': 'error',
'react/prop-types': 0,
'react/no-unescaped-entities': 0,
'no-irregular-whitespace': 'off',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-empty-function': 'error',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' }
],
'no-console': [
'error',
{
allow: ['warn', 'error']
}
],
'@typescript-eslint/explicit-module-boundary-types': 0
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off'
}
},
{
files: ['*.tsx', '*.ts'],
rules: {
'no-fallthrough': 'off',
'valid-typeof': 'off',
'no-redeclare': 'off',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'no-dupe-class-members': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
variables: false,
enums: false,
typedefs: false,
ignoreTypeReferences: false
}
]
}
}
],
globals: {
nameof: 'readonly'
}
};