-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
44 lines (43 loc) · 1.02 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
43
44
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import globals from "globals";
export default defineConfig([
globalIgnores(["**/node_modules", "**/dist"]),
{
name: "eslint-js-recommended-rules",
plugins: {
js,
},
extends: ["js/recommended"],
},
tseslint.configs.recommended.map((conf) => ({
...conf,
files: ["**/*.ts", "**/*.tsx"],
})),
eslintPluginPrettierRecommended,
{
name: "react",
...react.configs.flat.recommended,
},
reactHooks.configs["recommended-latest"],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
"react/react-in-jsx-scope": "off",
},
settings: {
react: {
version: "detect",
},
},
},
]);