-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
96 lines (96 loc) · 2.33 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
module.exports = {
extends: [
'airbnb',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier',
'next',
'next/core-web-vitals',
],
// even if already in ignore file, this is required to avoid warning in VSCode on these files
ignorePatterns: ['.eslintrc.js', 'next.config.js'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.eslint.json',
},
plugins: ['@typescript-eslint', 'import', 'prettier', 'react-hooks'],
root: true,
rules: {
'react/function-component-definition': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/naming-convention': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-use-before-define': 0,
'arrow-body-style': 0,
'import/extensions': [
2,
{
json: 'always',
ts: 'never',
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/*.test.+(ts|tsx)'],
},
],
'import/order': [
2,
{
alphabetize: {
order: 'asc',
},
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
],
'newlines-between': 'always',
pathGroups: [
{
group: 'internal',
pattern: '#*/**',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'import/prefer-default-export': 0,
'jsx-a11y/anchor-is-valid': 0,
'lines-between-class-members': [
'error',
'always',
{
exceptAfterSingleLine: true,
},
],
'max-classes-per-file': 0,
'no-console': [
'error',
{
allow: ['warn', 'error'],
},
],
'no-nested-ternary': 0,
'no-plusplus': 0,
'no-underscore-dangle': 0,
radix: ['error', 'as-needed'],
'react-hooks/exhaustive-deps': 2,
'react-hooks/rules-of-hooks': 2,
'react/destructuring-assignment': 0,
'react/jsx-props-no-spreading': 0,
'react/prop-types': 0,
'react/require-default-props': 0,
'react/require-default-props': [
0,
{
ignoreFunctionalComponents: true,
},
],
'react/state-in-constructor': 0,
'react/static-property-placement': 0,
},
}