-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
66 lines (66 loc) · 1.88 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['import', 'eslint-plugin-simple-import-sort', 'unused-imports'],
ignorePatterns: ['.pnp.*', '.yarn/**/*'],
extends: [
'eslint:recommended',
'next/core-web-vitals',
'next',
'prettier',
'plugin:import/recommended',
'plugin:@typescript-eslint/recommended',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './src',
},
},
},
rules: {
'import/no-cycle': [
'error',
{ allowUnsafeDynamicCyclicDependency: true },
],
'import/no-unresolved': 'error',
'react/jsx-key': 'off',
'react/no-unescaped-entities': 'off',
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
'react/jsx-first-prop-new-line': 'error',
'comma-dangle': ['error', 'always-multiline'],
eqeqeq: ['warn', 'smart'],
indent: ['error', 2, { SwitchCase: 1 }],
quotes: ['error', 'single'],
'eol-last': 'error',
semi: ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'jsx-quotes': ['error', 'prefer-single'],
'no-unused-vars': [
'error',
{ vars: 'all', args: 'none', ignoreRestSiblings: false },
],
'unused-imports/no-unused-imports-ts': ['error'],
'comma-spacing': ['error', { before: false, after: true }],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'import/newline-after-import': [
'error',
{ count: 1, considerComments: true },
],
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/ban-types': 'warn',
'import/named': 'off',
'react/display-name': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
};