
亮点
🌐 Highlights
报告未使用的 /* eslint */ 配置注释
🌐 Reporting unused /* eslint */ config comments
此版本引入了一个新的配置选项 linterOptions.reportUnusedInlineConfigs 以及相应的命令行选项 --report-unused-inline-configs。
🌐 This release introduces a new config option linterOptions.reportUnusedInlineConfigs and corresponding CLI option --report-unused-inline-configs.
当此选项设置为 "warn" 或 "error" 时,ESLint 将报告那些其严重性和选项与已为同一规则配置的设置相匹配的内联规则配置注释。
🌐 When this option is set to "warn" or "error", ESLint will report inline rule configuration comments whose severity and options match what’s already been configured for the same rule.
// eslint.config.js
export default [
{
linterOptions: {
reportUnusedInlineConfigs: "error"
},
rules: {
"no-unused-vars": ["error", { ignoreRestSiblings: true }]
}
}
];
// my-file.js
/* eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }] -- this inline config will be reported as unused */
特性
🌐 Features
错误修复
🌐 Bug Fixes
文档
🌐 Documentation
cfea9ab文档:澄清 overrideConfig 选项 (#19370) (Nicholas C. Zakas)2b84f66文档:更新自述文件 (#19362) (Nicholas C. Zakas)044f93c文档:澄清冻结规则描述 (#19351) (Pavel)797ee7c文档:修复 Bluesky 链接 (#19368) (Milos Djermanovic)81a9c0e文档:更新自述文件(GitHub Actions 机器人)093fb3d文档:在规则示例中将var替换为let和const(#19365) (Tanuj Kanti)417de32文档:在规则示例中将 var 替换为 const (#19352) (jj)17f2aae文档:更新入门配置以匹配默认生成的配置 (#19308) (0xDev)8a0a5a8文档:更好的global ignores指令 (#19297) (Jacopo Marrone)6671a2c文档:更新自述文件(GitHub Actions 机器人)e39d3f2文档:修复规则类别分隔线 (#19264) (Tanuj Kanti)e0cf53f文档:修复小屏幕的搜索结果框位置 (#19328) (Tanuj Kanti)f92a680文档:在规则示例中将 var 替换为 let 或 const (#19331) (Ravi Teja Kolla)b04b84b文档:恢复 TS 配置文件文档中的意外更改 (#19336) (Francesco Trotta)
杂项
🌐 Chores
