-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
94 lines (90 loc) · 3.29 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'tailwindcss'],
extends: [
'airbnb',
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'plugin:tailwindcss/recommended',
],
rules: {
'semi': 'warn',
'indent': ['warn', 4, { SwitchCase: 1 }],
'comma-dangle': ['warn', 'always-multiline'],
'quote-props': ['warn', 'consistent-as-needed'],
'max-len': ['error', { code: 150 }],
'default-case': 'off',
'object-curly-newline': ['warn', { multiline: true, consistent: true }],
'no-shadow': 'off',
'no-nested-ternary': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/consistent-type-imports': ['warn', { fixStyle: 'inline-type-imports' }],
'react/jsx-indent': ['warn', 4],
'react/jsx-indent-props': 'off',
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.tsx'] }],
'react/jsx-one-expression-per-line': 'off',
'react/require-default-props': 'off',
'react/no-unescaped-entities': 'off',
'react/no-array-index-key': 'off',
'react/jsx-props-no-spreading': 'off',
'react/function-component-definition': ['error', { namedComponents: 'arrow-function' }],
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/order': [
'error',
{
'newlines-between': 'never',
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'pathGroups': [
{
pattern: 'react',
group: 'builtin',
position: 'before',
},
{
pattern: 'next/**',
group: 'builtin',
position: 'before',
},
{
pattern: '@/app/**',
group: 'internal',
position: 'before',
},
{
pattern: '@/components/**',
group: 'internal',
position: 'before',
},
{
pattern: '@/utils/**',
group: 'internal',
position: 'before',
},
{
pattern: '@/types/**',
group: 'internal',
position: 'before',
},
{
pattern: './**',
group: 'sibling',
position: 'before',
},
],
'pathGroupsExcludedImportTypes': ['react', 'next'],
},
],
},
};