chore(lint): replace eslint with tsc --noEmit + prettier --check#94
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
npm install当前会拉起整条 eslint 弃用警告链(@antfu/eslint-config-*、eslint@8EOL、rimraf@3/glob@7via eslint、@humanwhocodes/*、eslint-plugin-markdown)。这些全部来自 dev/eslint 工具链,不影响发布的 CLI,但噪声大、工具链老化。改动
按既定方案(方案 2,分阶段)移除 eslint,
npm run lint改为类型检查 + 格式检查:eslint+@attachments/eslint-config(安装减少 211 个包)typecheck=tsc -p tsconfig.json --noEmitlintscript 改为npm run typecheck && prettier --check "src/**/*.ts" "__tests__/**/*.ts".eslintrc.jssanitize-terminal.ts中已失效的eslint-disable-next-line注释prettier依赖(PR2 再评估是否删除 / 统一 format)验证
npm install:found 0 vulnerabilities,eslint 链警告消失(jest 的glob弃用警告属测试链,非本次范围)npm run lint:通过(typecheck 0 错 + prettier --check 通过)npm test:11 suites / 106 tests 全过npm run build:成功提交拆分(单关注点)
已知取舍