-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
49 lines (48 loc) · 1.31 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
44
45
46
47
48
49
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import eslint from "@eslint/js";
import reactHooks from "eslint-plugin-react-hooks/index.js";
import reactJsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js";
import reactRecommended from "eslint-plugin-react/configs/recommended.js";
import tseslint from "typescript-eslint";
export default tseslint.config(
{ ignores: ["src/components/ui/"] },
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
},
...fixupConfigRules(reactRecommended),
{
languageOptions: reactJsxRuntime.languageOptions,
rules: reactJsxRuntime.rules,
},
{
plugins: {
"react-hooks": fixupPluginRules(reactHooks),
},
rules: reactHooks.configs.recommended.rules,
},
{
settings: {
react: {
version: "detect",
},
},
rules: {
"react/display-name": "off",
"react/no-unescaped-entities": "off",
"react/no-unknown-property": ["error", { ignore: ["css"] }],
},
},
);