-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
43 lines (42 loc) · 1.17 KB
/
eslint.config.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
import eslintReact from "@eslint-react/eslint-plugin";
import { fixupPluginRules } from "@eslint/compat";
import eslint from "@eslint/js";
import reactCompiler from "eslint-plugin-react-compiler";
import reactHooks from "eslint-plugin-react-hooks/index.js";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
export default tseslint.config(
{ ignores: ["src/components/ui/", "src/lib/"] },
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
},
eslintReact.configs["recommended-typescript"],
{
plugins: {
"react-hooks": fixupPluginRules(reactHooks),
},
rules: reactHooks.configs.recommended.rules,
},
reactRefresh.configs.recommended,
{
plugins: {
"react-compiler": reactCompiler,
},
rules: {
"react-compiler/react-compiler": "error",
},
},
);