-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
80 lines (78 loc) · 2.33 KB
/
eslint.config.mjs
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
import prettier from 'eslint-plugin-prettier/recommended'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import tseslint from 'typescript-eslint'
import { fixupConfigRules } from '@eslint/compat'
import { FlatCompat } from '@eslint/eslintrc'
import eslint from '@eslint/js'
const compat = new FlatCompat()
export default tseslint.config(
prettier,
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
...fixupConfigRules(compat.extends('plugin:@next/next/recommended')),
...fixupConfigRules(compat.extends('plugin:react/recommended')),
...fixupConfigRules(compat.extends('plugin:react-hooks/recommended')),
...fixupConfigRules(compat.extends('plugin:jsx-a11y/strict')),
{
plugins: {
'simple-import-sort': simpleImportSort
},
languageOptions: {
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaVersion: 'latest'
}
},
settings: {
react: {
version: 'detect'
}
},
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/require-await': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/unbound-method': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/prefer-nullish-coalescing': 0,
'@typescript-eslint/no-empty-interface': 0,
'@next/next/no-img-element': 0,
'react/react-in-jsx-scope': 0,
'no-empty-pattern': 0,
'no-useless-escape': 0,
'no-constant-condition': 0,
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: false,
trailingComma: 'none'
}
],
'simple-import-sort/imports': [
'error',
{
groups: [
[
'^\\u0000',
'^\\w[^{}]*$',
'^@\\w[^{}]*$',
'^\\w.*\\{.*\\}',
'^@\\w.*\\{.*\\}',
'^\\.'
]
]
}
],
'simple-import-sort/exports': 'error'
}
},
{ ignores: ['.next', 'next.config.js'] }
)