-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.38 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
'plugin:@next/next/recommended',
],
plugins: ['react-hooks', 'unused-imports'],
rules: {
'no-console': 0,
'import/named': 0,
'import/order': 1,
'import/no-default-export': 0,
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unnecessary-type-constraint': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-unused-vars': 0,
'unused-imports/no-unused-imports': 2,
'unused-imports/no-unused-vars': [
1,
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'react-hooks/rules-of-hooks': 2,
'react-hooks/exhaustive-deps': 1,
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'],
moduleDirectory: ['node_modules', 'src'],
},
},
},
}