Skip to content

Commit

Permalink
🔧 调整配置
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Dec 4, 2024
1 parent 2a83fcb commit 02ddb44
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 222 deletions.
14 changes: 7 additions & 7 deletions eslint/vueEslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import pluginImport from "eslint-plugin-import";
import pluginPrettier from "eslint-plugin-prettier";
import pluginVue from "eslint-plugin-vue";
import globals from "globals";
import eslint_ts from "typescript-eslint";
import vue_parser from "vue-eslint-parser";
import eslintTs from "typescript-eslint";
import parserVue from "vue-eslint-parser";

const tsConfigRules = {
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "angle-bracket" }],
Expand All @@ -24,25 +24,25 @@ const tsConfigRules = {

const tsConfig = {
files: ["*.ts", "*.d.ts", "src/**/*.ts", "src/**/*.d.ts"],
plugins: { typescript: eslint_ts, import: pluginImport, prettier: pluginPrettier },
plugins: { typescript: eslintTs, import: pluginImport, prettier: pluginPrettier },
languageOptions: {
parser: eslint_ts.parser,
parser: eslintTs.parser,
parserOptions: { project: "tsconfig.json", tsconfigRootDir: "." },
},
rules: tsConfigRules,
};

const vueConfig = {
files: ["src/**/*.vue"],
files: ["src/**/*.vue", "src/App.vue"],
plugins: { vue: pluginVue, import: pluginImport, prettier: pluginPrettier },
languageOptions: {
globals: { ...globals.browser, ...globals.es2021, TGApp: "readonly", window: "readonly" },
ecmaVersion: "latest",
sourceType: "module",
parser: vue_parser,
parser: parserVue,
parserOptions: {
project: "tsconfig.json",
parser: eslint_ts.parser,
parser: eslintTs.parser,
extraFileExtensions: [".vue"],
tsconfigRootDir: ".",
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"artplayer": "^5.2.1",
"clipboard": "^2.0.11",
"color-convert": "^2.0.1",
"echarts": "^5.5.1",
"echarts": "file:../../Node/echarts",
"html2canvas": "^1.4.1",
"js-md5": "^0.8.3",
"jsencrypt": "^3.3.2",
Expand Down
26 changes: 14 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 02ddb44

Please sign in to comment.