-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
66 lines (65 loc) · 1.77 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
import nextPlugin from "@next/eslint-plugin-next";
import reactPlugin from "eslint-plugin-react";
import hooksPlugin from "eslint-plugin-react-hooks";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import importPlugin from "eslint-plugin-import";
import reactCompiler from 'eslint-plugin-react-compiler'
export default [
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parser: tsParser,
parserOptions: {
project: "./tsconfig.json"
}
},
plugins: {
react: reactPlugin,
'react-hooks': hooksPlugin,
"@typescript-eslint": tsPlugin,
"import": importPlugin,
"@next/next": nextPlugin,
'react-compiler': reactCompiler,
},
files: ["**/*.{js,jsx,ts,tsx}"],
settings: {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
},
"node": true
}
},
rules: {
...reactPlugin.configs['jsx-runtime'].rules,
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs['core-web-vitals'].rules,
...tsPlugin.configs["strict"].rules,
...tsPlugin.configs["stylistic"].rules,
...importPlugin.configs["recommended"].rules,
...importPlugin.configs["typescript"].rules,
...hooksPlugin.configs.recommended.rules,
'react-compiler/react-compiler': 'warn',
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
];