
亮点
🌐 Highlights
context.getPhysicalFilename()
规则现在可以在 context 对象上使用新方法 getPhysicalFilename() 来获取磁盘上文件的完整路径,而不包含任何代码块信息。
🌐 Rules can now use the new method getPhysicalFilename() on the context object to get the full path of the file on disk without any code block information.
当 ESLint 与 processors 一起使用时,getPhysicalFilename 和 getFilename 之间的差异是可观察的:
🌐 The difference between getPhysicalFilename and getFilename is observable when ESLint is used with processors:
context.getPhysicalFilename() // "/project/example.md" - original file
context.getFilename() // "/project/example.md/0_0.js" - virtual filename assigned to a code block
特性
🌐 Features
增强功能
🌐 Enhancements
错误修复
🌐 Bug Fixes
1f048cb修复:String()导致的 [no-implicit-coercion] 误报问题 (修复 #14623) (#14641) (Milos Djermanovic)e44ce0a修复: no-duplicate-imports 允许无法合并的 (修复 #12758, 修复 #12760) (#14238) (Soufiane Boutahlil)e4f111b修复:[arrow-body-style] 在对象模式下的崩溃(修复 #14633)(#14635) (Milos Djermanovic)
文档
🌐 Documentation
123fb86文档:添加“需要反馈”分类说明 (#14670) (Nicholas C. Zakas)2e43dac文档:修复no-sequences示例 (#14643) (Nitin Kumar)958ff4e文档:在 no-seq 规则中为箭头函数添加说明 (#14578) (Nitin Kumar)85a2725文档:更新 README 团队和赞助商(ESLint Jenkins)
依赖升级
🌐 Dependency Upgrades
1237705升级:@eslint/eslintrc 到 0.4.2 (#14672) (Milos Djermanovic)8d1e75a升级:package.json 中的 glob-parent 版本 (#14658) (Hamza Najeeb)
杂项
🌐 Chores
d709abf任务:修复 no-unused-vars 中的评论位置 (#14648) (Milos Djermanovic)ec28b5a任务:升级 eslint-plugin-eslint-plugin (#14590) (薛定谔的猫)
