-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
47 lines (46 loc) · 1.15 KB
/
.eslintrc.cjs
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
const config = {
env: {
browser: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['import', '@typescript-eslint', 'react-hooks', 'jsx-a11y'],
extends: [
'next',
'next/core-web-vitals',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'prettier',
],
rules: {
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
alphabetize: { order: 'asc', caseInsensitive: true },
pathGroups: [
{
pattern: '@/**',
group: 'parent',
position: 'before',
},
],
'newlines-between': 'never',
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'jsx-a11y/accessible-emoji': 'warn',
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'warn',
eqeqeq: 'error',
'no-console': 'warn',
'prefer-const': 'error',
},
};
module.exports = config;