-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (52 loc) · 1.83 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
/** react-app config already use "@typescript-eslint" for "*index.ts(x)" files */
module.exports = {
extends: ['react-app', 'prettier', 'plugin:@next/next/recommended'],
plugins: ['prettier', 'unused-imports'],
env: {
browser: true,
node: true,
jest: false,
},
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
rules: {
'prettier/prettier': 'error',
'import/prefer-default-export': 'off',
'no-unused-vars': 'off', // or "@typescript-eslint/no-unused-vars": "off",
'unused-imports/no-unused-imports': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'off',
'@next/next/no-img-element': 'off',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/explicit-function-return-type': 'warn',
'unused-imports/no-unused-vars': [
'warn',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
],
'import/order': [
'error',
{
pathGroups: [
{
pattern: 'next/**',
group: 'external',
position: 'before',
},
{
pattern: '@nextui-org/react',
group: 'external',
position: 'before',
},
{
pattern: '@/**',
group: 'internal',
},
],
pathGroupsExcludedImportTypes: [],
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
},
],
},
};