Skip to content

chore: upgrade dependencies to latest, migrate to ESLint 9 flat config - #14

Merged
hustcc merged 10 commits into
mainfrom
chore/upgrade-deps
Jun 17, 2026
Merged

hustcc merged 10 commits into
mainfrom
chore/upgrade-deps

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor
  • TypeScript 4.2 → 5.9, @types/node added
  • ESLint 7 → 9, .eslintrc.js → eslint.config.js, eslint-plugin-import → import-x
  • @typescript-eslint/* 4 → 8
  • @lint-md/core 0.2 → 2.0, adapt API (lint→lintMarkdown, fix→fixedResult)
  • husky 5 → 9, commitlint 12 → 19, rimraf 3 → 6
  • Update rule names to match @lint-md/core v2 conventions
  • Remove deleted rules (no-empty-delete, no-space-in-emphasis)

@hustcc

hustcc commented Jun 16, 2026

Copy link
Copy Markdown
Member

remove the lock file?

@luojiyin1987

luojiyin1987 commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor Author

remove the lock file?

No remove lock file。 because use pnpm, so I add pnpm-lock.yaml to git

@luojiyin1987

Copy link
Copy Markdown
Contributor Author

验证报告

1. 规则覆盖对比 ✔

插件导出 16 条规则,与 @lint-md/core@2.0.0 完全匹配,无遗漏、无多余。

2. 逐条功能验证 ✔

16/16 条规则在 v2 API 下均能正确检测违规:

规则 测试输入 状态
no-empty-code 空代码块 PASS
no-empty-blockquote 空引用 PASS
no-empty-code-lang 无语言代码块 PASS
no-empty-inline-code 空内联代码 PASS
no-empty-list 空列表 PASS
no-empty-url 空链接 PASS
no-full-width-number 全角数字 PASS
no-multiple-space-blockquote 多余空格引用 PASS
no-space-in-inline-code 内联代码首尾空格 PASS
no-space-in-link 链接文本首尾空格 PASS
no-special-characters 特殊字符 PASS
space-around-alphabet 中英文无空格 PASS
space-around-number 中文数字无空格 PASS
use-standard-ellipsis 非标准省略号 PASS
correct-title-trailing-punctuation 标题末尾标点 PASS
no-long-code 代码超长 PASS

3. API 兼容性 ✔

v2 lintMarkdown 返回结构 ({lintResult, fixedResult}) 字段齐全,旧 API 字段 (err.type, err.start) 无残留。

4. 端到端集成 ✔

parser → rules → report 管线正常
输入: # test\n```js\n\n\n```\n> \n
检出: no-empty-code + no-empty-blockquote

5. 构建流程 ✔

pnpm build && pnpm sync-rules && pnpm lint
  • build 编译通过
  • sync-rules 规则同步到 lib/ 和 src/
  • lint 0 error 0 warning

@hustcc
hustcc merged commit 9880bde into main Jun 17, 2026
2 checks passed
@hustcc
hustcc deleted the chore/upgrade-deps branch June 17, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants