-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint.config.ts
47 lines (46 loc) · 1.02 KB
/
eslint.config.ts
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
import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
export default tseslint.config(
js.configs.recommended,
tseslint.configs.strictTypeChecked,
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"],
{
files: ["**/*.{js,jsx}"],
plugins: { "react-hooks": reactHooks },
// ...
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
},
{
ignores: [
"storybook-static",
".storybook",
"coverage",
"dist",
"*.config.{ts,js}",
],
},
{
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
projectService: {
allowDefaultProject: ["*.config.{js,ts}"],
},
tsconfigRootDir: import.meta.dirname,
},
},
settings: {
react: {
version: "detect",
},
},
},
);