-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (40 loc) · 1.33 KB
/
Copy patheslint.config.mjs
File metadata and controls
50 lines (40 loc) · 1.33 KB
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
import eslint from "@eslint/js"
import eslintConfigPrettier from "eslint-config-prettier"
import eslintPluginReact from "eslint-plugin-react"
import eslintPluginReactHooks from "eslint-plugin-react-hooks"
import eslintPluginReactRefresh from "eslint-plugin-react-refresh"
import tseslint from "typescript-eslint"
/** @type {import('eslint').Linter.Config[]} */
const eslintConfig = [
{ ignores: ["dist", "node_modules", "public", "prettier.config.cjs"] },
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginReact.configs.flat.recommended,
eslintConfigPrettier,
{
plugins: {
react: eslintPluginReact,
"react-hooks": eslintPluginReactHooks,
"react-refresh": eslintPluginReactRefresh,
},
settings: {
react: {
version: "detect",
},
},
rules: {
// typescript-eslint
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-unused-vars": "warn",
// eslint-plugin-react
...eslintPluginReact.configs.recommended.rules,
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
// eslint-plugin-react-hooks
...eslintPluginReactHooks.configs.recommended.rules,
// eslint-plugin-react-refresh
"react-refresh/only-export-components": "off",
},
},
]
export default eslintConfig