-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy patheslint.config.js
31 lines (30 loc) · 1.03 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
import pluginJs from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import pluginReact from "eslint-plugin-react";
import globals from "globals";
import tseslint from "typescript-eslint";
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
settings: { react: { version: "detect" } },
languageOptions: { globals: globals.browser },
},
// https://github.com/eslint/eslint/discussions/18304
{
ignores: ["app/dist/*/*", "app/src-tauri/*/*", "docs/src/.vitepress/dist/*/*", "docs/src/.vitepress/cache/*/*"],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
pluginReact.configs.flat["jsx-runtime"],
eslintConfigPrettier,
eslintPluginPrettierRecommended,
// 2024/10/23 这里的rules不能写在上面,否则会被覆盖
{
rules: {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
},
},
];