-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
101 lines (101 loc) · 2.68 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
101
module.exports = {
env: {
browser: true,
node: true
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'next',
'airbnb',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'plugin:react/jsx-runtime',
'prettier'
],
plugins: ['react', 'prettier'],
settings: {
react: {
version: 'detect'
}
},
rules: {
'import/order': [
'error',
{
'newlines-between': 'always-and-inside-groups',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling'],
pathGroups: [
{
pattern: 'react',
group: 'builtin',
position: 'before'
},
{
pattern: '@/lib/**/*',
group: 'internal',
position: 'after'
},
{
pattern: '@/components/**/*',
group: 'internal',
position: 'after'
},
{
pattern: '@/server-components/**/*',
group: 'internal',
position: 'after'
},
{
pattern: '@/models/**/*',
group: 'internal',
position: 'after'
},
{
pattern: 'src/**/*',
group: 'internal',
position: 'after'
},
{
pattern: '**/*.+(svg|png|jpg|jpeg|mp3|mp4|tiff|webp|gif)',
group: 'sibling',
position: 'after'
},
{
pattern: './*.scss',
group: 'sibling',
position: 'after'
}
],
pathGroupsExcludedImportTypes: [],
alphabetize: {
order: 'asc'
}
}
],
'prettier/prettier': 'error',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'import/newline-after-import': 'error',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
'react/jsx-no-bind': 'warn',
'react/jsx-no-useless-fragment': 'warn',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
'react/function-component-definition': 'off',
'react/require-default-props': 'off',
'@typescript-eslint/no-var-requires': 'warn',
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/interactive-supports-focus': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'react/no-array-index-key': 'warn',
'react/no-unused-prop-types': 'warn'
}
};