xiao_001
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
// import { defineConfig } from "eslint/config";
|
||||
import tseslint from "@electron-toolkit/eslint-config-ts";
|
||||
import eslintConfigPrettier from "@electron-toolkit/eslint-config-prettier";
|
||||
import eslintPluginVue from "eslint-plugin-vue";
|
||||
import vueParser from "vue-eslint-parser";
|
||||
import { defineConfig } from "@eslint/config-helpers"; // 👈 导入这个 defineConfig
|
||||
|
||||
export default defineConfig(
|
||||
{ ignores: ["**/node_modules", "**/dist", "**/out"] },
|
||||
tseslint.configs.recommended,
|
||||
eslintPluginVue.configs["flat/recommended"],
|
||||
{
|
||||
files: ["**/*.vue"],
|
||||
languageOptions: {
|
||||
parser: vueParser,
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
},
|
||||
extraFileExtensions: [".vue"],
|
||||
parser: tseslint.parser
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ["**/*.{ts,mts,tsx,vue}"],
|
||||
rules: {
|
||||
"no-undef": "off", // ✅ 关键
|
||||
"vue/require-default-prop": "off",
|
||||
"vue/multi-word-component-names": "off",
|
||||
"vue/block-lang": [
|
||||
"error",
|
||||
{
|
||||
script: {
|
||||
lang: "ts"
|
||||
}
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
eslintConfigPrettier
|
||||
);
|
||||
Reference in New Issue
Block a user