
亮点
🌐 Highlights
批量屏蔽的 API 支持
🌐 API Support for Bulk Suppressions
ESLint v10.1.0 引入了对以前仅在 CLI 中可用的 批量抑制 功能的 API 支持。
🌐 ESLint v10.1.0 introduces API support for the bulk suppressions feature that was previously only available in the CLI.
ESLint API 的使用者,例如 IDE,现在可以将 applySuppressions: true 选项传递给 ESLint 构造函数。使用此选项时,来自抑制文件的抑制会自动应用到 ESLint#lintFiles() 和 ESLint#lintText() 方法的结果中。
🌐 ESLint API consumers, such as IDEs, can now pass the applySuppressions: true option to the ESLint constructor. With this option, suppressions from the suppressions file are automatically applied to results from ESLint#lintFiles() and ESLint#lintText() methods.
const eslint = new ESLint({
applySuppressions: true,
// optional, defaults to `eslint-suppressions.json`
suppressionsLocation: "./config/my-suppressions.json",
});
有关详细信息,请参阅 批量抑制 - 在 Node.js API 中的使用 部分。
🌐 Please see the Bulk Suppressions - Usage with the Node.js API section for more details.
特性
🌐 Features
ff4382b功能:在TSModuleBlock中为no-var应用修复 (#20638) (Tanuj Kanti)0916995功能:为批量屏蔽实现 API 支持 (#20565) (Blake Sager)
错误修复
🌐 Bug Fixes
[2b8824e](https://github.com/eslint/eslint/commit/2b8824e6be4223980e929a20025602df20d05ea2)修复:防止在变量声明前使用时no-var自动修复 (#20464) (Amaresh S M)e58b4bf修复:更新 eslint (#20597) (renovate[bot])
文档
🌐 Documentation
b7b57fe文档:在require-jsdoc中使用正确的 JSDoc 链接 (#20641) (mkemna-clb)58e4cfc文档:添加弃用通知部分 (#20639) (Milos Djermanovic)7143dbf文档:更新 v9@eslint/js使用迁移指南 (#20540) (fnx)035fc4f文档:请注意,globalReturn仅适用于sourceType: "script"(#20630) (Milos Djermanovic)e972c88文档:将 ESLint 选项描述合并到类型定义中 (#20608) (Francesco Trotta)7f10d84文档:更新自述文件(GitHub Actions 机器人)aeed007文档:在新标签页中打开游乐场链接 (#20602) (Tanuj Kanti)a0d1a37文档:添加 AI 使用政策 (#20510) (Nicholas C. Zakas)
杂项
🌐 Chores
a9f9cce事务:将依赖 eslint-plugin-unicorn 更新到 ^63.0.0 (#20584) (Milos Djermanovic)1f42bd7杂务: 将prettier更新到 3.8.1 (#20651) (루밀LuMir)c0a6f4a杂项:将依赖 @eslint/json 更新到 ^1.2.0 (#20652) (renovate[bot])cc43f79事务: 将依赖 c8 更新到 v11 (#20650) (renovate[bot])2ce4635事务:将依赖 @eslint/json 更新到 v1 (#20649) (renovate[bot])f0406ee任务:将依赖 markdownlint-cli2 更新到 ^0.21.0 (#20646) (renovate[bot])dbb4c95事务:移除干线 (#20478) (sethamus)c672a2a测试:修复空输出文件的 CLI 测试 (#20640) (kuldeep kumar)c7ada24ci: 将 pnpm/action-setup 从 4.3.0 更新到 4.4.0 (#20636) (dependabot[bot])07c4b8b测试:修复没有测试运行器的RuleTester测试 (#20631) (Francesco Trotta)079bba7测试:为isValidWithUnicodeFlag添加测试 (#20601) (Manish chaudhary)5885ae6ci:在 CI 中取消固定 Node.js 25.x (#20615) (Copilot)f65e5d3杂务: 更新 pnpm/action-setup 摘要到 b906aff (#20610) (renovate[bot])
