-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
67 lines (67 loc) · 1.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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'vacuumlabs',
'plugin:@next/next/recommended',
'prettier',
],
env: {
node: true,
browser: true,
},
globals: {
JSX: true,
},
rules: {
'@typescript-eslint/no-explicit-any': [
'error',
{
ignoreRestArgs: true,
},
],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-use-before-define': 'off',
// '@typescript-eslint/no-use-before-define': ['error'], // TODO this throws errors on styled components
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'import/no-cycle': 'error',
'import/no-extraneous-dependencies': ['error'],
'react-hooks/rules-of-hooks': 'error',
'max-len': ['error', {code: 120}],
'react/display-name': 'off',
'linebreak-style': 0,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
ecmaVersion: 2020,
sourceType: 'module',
createDefaultProgram: true,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
plugins: ['import', 'react-hooks'],
overrides: [
{
files: ['src/**/*.ts', 'src/**/*.tsx'],
rules: {
'no-undef': 'off',
},
},
{
files: ['src/**/*.tsx'],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
'prefer-arrow-callback': 'off',
},
},
],
}