-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
127 lines (127 loc) · 3.19 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
module.exports = {
extends: ['next/core-web-vitals', 'plugin:@typescript-eslint/recommended', 'plugin:import/recommended', 'prettier'],
rules: {
'jsx-a11y/alt-text': 'off',
'react/display-name': 'off',
'react/no-children-prop': 'off',
'@next/next/no-img-element': 'off',
'@next/next/no-page-custom-font': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'lines-around-comment': [
'error',
{
beforeBlockComment: true,
beforeLineComment: true,
allowBlockStart: true,
allowObjectStart: true,
allowArrayStart: true
}
],
'padding-line-between-statements': [
'error',
{
blankLine: 'any',
prev: 'export',
next: 'export'
},
{
blankLine: 'always',
prev: ['const', 'let', 'var'],
next: '*'
},
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var']
},
{
blankLine: 'always',
prev: '*',
next: ['function', 'multiline-const', 'multiline-block-like']
},
{
blankLine: 'always',
prev: ['function', 'multiline-const', 'multiline-block-like'],
next: '*'
}
],
'newline-before-return': 'error',
'import/newline-after-import': [
'error',
{
count: 1
}
],
'import/order': [
'error',
{
groups: ['builtin', 'external', ['internal', 'parent', 'sibling', 'index'], ['object', 'unknown']],
pathGroups: [
{
pattern: 'react',
group: 'external',
position: 'before'
},
{
pattern: 'next/**',
group: 'external',
position: 'before'
},
{
pattern: '~/**',
group: 'external',
position: 'before'
},
{
pattern: '@/**',
group: 'internal'
}
],
pathGroupsExcludedImportTypes: ['react', 'type'],
'newlines-between': 'always-and-inside-groups'
}
],
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
Function: 'Use a specific function type instead',
Object: 'Use object instead',
Boolean: 'Use boolean instead',
Number: 'Use number instead',
String: 'Use string instead',
Symbol: 'Use symbol instead',
any: false,
'{}': false
}
}
]
},
settings: {
react: {
version: 'detect'
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
typescript: {
project: './tsconfig.json'
}
}
},
overrides: [
{
files: ['*.ts', '*.tsx', 'src/iconify-bundle/*'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
}
]
}