5. 拉取Micorsoft TODO任务

5. 拉取Micorsoft TODO任务

明廷盛 嘻嘻😁

1. 删除ESLint+TS检查

STEP 1
在项目根目录执行,删除配置文件并移除依赖:

cd /Volumes/SAMSUNG_1T/Documents/CodeBeach/project/mtd_report

rm -f .eslintrc.cjs .prettierrc.yaml

npm uninstall -D \
@electron-toolkit/eslint-config \
@electron-toolkit/eslint-config-ts \
@rushstack/eslint-patch \
@vue/eslint-config-prettier \
@vue/eslint-config-typescript \
eslint \
eslint-plugin-vue \
prettier \
vue-tsc

STEP 2
清掉 package.json 里的 lint / format / typecheck 脚本,并把 build 改成不再跑类型检查:

node -e "
const fs=require('fs');
const p='package.json';
const j=JSON.parse(fs.readFileSync(p,'utf8'));
delete j.scripts.format;
delete j.scripts.lint;
delete j.scripts['typecheck:node'];
delete j.scripts['typecheck:web'];
delete j.scripts.typecheck;
j.scripts.build='electron-vite build';
fs.writeFileSync(p, JSON.stringify(j,null,2)+'\n');
"

STEP 3
删除 VS Code 里 TS/JS 格式化配置,并检查残留引用:

node -e "
const fs=require('fs');
const p='.vscode/settings.json';
const j=JSON.parse(fs.readFileSync(p,'utf8'));
delete j['[typescript]'];
delete j['[javascript]'];
fs.writeFileSync(p, JSON.stringify(j,null,2)+'\n');
"

grep -RIn --exclude-dir=node_modules --exclude=package-lock.json -E 'eslint|prettier|typecheck|vue-tsc|tsc --noEmit' .

STEP 4
清理你这轮 grep 命中的残留:

cd /Volumes/SAMSUNG_1T/Documents/CodeBeach/project/mtd_report

python3 - <<'PY'
from pathlib import Path
import json

# 1) 清掉 .vscode/settings.json 里剩余的 prettier 引用
p = Path(".vscode/settings.json")
j = json.loads(p.read_text())
j.pop("[json]", None)
p.write_text(json.dumps(j, indent=2, ensure_ascii=False) + "\n")

# 2) 清掉 .vscode/extensions.json 里的 eslint 推荐
p = Path(".vscode/extensions.json")
j = json.loads(p.read_text())
j["recommendations"] = [x for x in j.get("recommendations", []) if x != "dbaeumer.vscode-eslint"]
p.write_text(json.dumps(j, indent=2, ensure_ascii=False) + "\n")

# 3) 清掉 README 里的 ESLint / Prettier 文案
p = Path("README.md")
s = p.read_text()
s = s.replace(
"- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)",
"- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)"
)
p.write_text(s)

# 4) 清掉 electron-builder.yml 里的 eslint / prettier 打包排除项
p = Path("electron-builder.yml")
s = p.read_text()
s = s.replace(".eslintrc.cjs,", "")
s = s.replace(".prettierrc.yaml,", "")
s = s.replace(".eslintignore,", "")
s = s.replace(".prettierignore,", "")
p.write_text(s)

# 5) 清掉 env.d.ts 里的 eslint 注释
p = Path("src/renderer/src/env.d.ts")
s = p.read_text()
s = s.replace(" // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types\n", "")
p.write_text(s)
PY

STEP 5
重新检查是否还有残留:

grep -RIn --exclude-dir=node_modules --exclude=package-lock.json -E 'eslint|prettier|typecheck|vue-tsc|tsc --noEmit' .

STEP 6
如果 grep 没输出,再更新锁文件并装干净依赖:

npm install

2. Electron打开新窗口

<template>
<h1>这里是主面板</h1>
{{ mainViewStore.counter }}
<button @click="router.push('/management')">点击前往管理页面</button>

</template>

<script setup lang="ts">
import router from '@renderer/router';

</script>
  • Title: 5. 拉取Micorsoft TODO任务
  • Author: 明廷盛
  • Created at : 2026-06-03 14:21:30
  • Updated at : 2026-06-03 09:39:00
  • Link: https://blog.20040424.xyz/2026/06/03/⚔️实战项目/5. 拉取Micorsoft TODO任务/
  • License: All Rights Reserved © 明廷盛
On this page
5. 拉取Micorsoft TODO任务