-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
42 lines (41 loc) · 1.24 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
import eslintPluginPerfectionist from "eslint-plugin-perfectionist"
import eslintPluginReact from "eslint-plugin-react"
import eslintPluginReactHooks from "eslint-plugin-react-hooks"
import eslintPluginSortDestructureKeys from "eslint-plugin-sort-destructure-keys"
import eslint from "@eslint/js"
export default [
eslint.configs.recommended,
eslintPluginReact.configs.flat.recommended,
{
languageOptions: {
globals: {
AbortController: "readonly",
clearTimeout: "readonly",
console: "readonly",
fetch: "readonly",
process: "readonly",
setTimeout: "readonly",
},
},
plugins: {
perfectionist: eslintPluginPerfectionist,
react: eslintPluginReact,
"react-hooks": eslintPluginReactHooks,
"sort-destructure-keys": eslintPluginSortDestructureKeys,
},
rules: {
"no-debugger": "error",
"perfectionist/sort-named-exports": "error",
"perfectionist/sort-objects": "error",
"react/jsx-sort-props": "error",
"react/prop-types": "off",
"sort-destructure-keys/sort-destructure-keys": "error",
...eslintPluginReactHooks.configs.recommended.rules,
},
settings: {
react: {
version: "detect",
},
}
},
]