
亮点
🌐 Highlights
此版本包含以下重大更改:
🌐 This release contains the following breaking changes:
- 更新核心规则中的默认配置选项。
- 正在更新
eslint:recommended中推荐的规则。 - 使 RuleTester 检查更严格。
正在安装
🌐 Installing
由于这是预发布版本,npm 不会自动升级。安装时必须指定 next 标签:
🌐 Since this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:
npm i eslint@next --save-dev
你也可以直接指定版本:
🌐 You can also specify the version directly:
npm i eslint@7.0.0-alpha.2 --save-dev
迁移指南
🌐 Migration Guide
由于有很多变化,我们创建了一个迁移指南,详细描述了这些变化以及你应采取的步骤来应对它们。我们预计大多数用户应该能够在不进行任何构建更改的情况下升级,但如果你遇到问题,迁移指南应该是一个有用的资源。
🌐 As there are a lot of changes, we’ve created a migration guide describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.
重大更改
🌐 Breaking Changes
4af06fc爆料:在 RuleTester 中带有未知错误属性的测试应失败 (#12096) (Milos Djermanovic)afa9aac最新消息:类默认truecomputed-property-spacing(修复 #12812)(#12915)(Milos Djermanovic)7d52151最新消息:类在 accessor-pairs 中的默认true(修复 #12811)(#12919)(Milos Djermanovic)78182e4重大新闻:为 eslint:recommended 添加新规则(修复 #12911)(#12920)(Milos Djermanovic)6423e11重大更新:在 func-names 中检查未命名的默认导出(修复 #12194)(#12195)(陈嘉文)
增强功能
🌐 Enhancements
a5b41a7更新:no-restricted-modules 处理模板字面量(修复 #12926)(#12927) (Michal Piechowiak)051567a更新:在 id-length 中检查数组模式的标识符(修复 #12832)(#12839) (YeonJuan)[9038a29](https://github.com/eslint/eslint/commit/9038a29569548c0563c29dbe9f7dae280ff3addd)更新:func-namesas-needed在 AssignmentPattern 上的假阴性 (#12932) (Milos Djermanovic)7747177更新:在 id-blacklist 中报告重命名 id 解构(修复 #12807)(#12923) (YeonJuan)77df505更新:检查对象解构中的重命名标识符(修复 12827)(#12881) (YeonJuan)41de9df更新:enforceForLogicalOperands no-extra-boolean-cast(修复 #12137)(#12734) (jmoore914)
错误修复
🌐 Bug Fixes
afde78b修复: curly 删除了 if 和 else 之间的必要大括号 (修复 #12928) (#12943) (Milos Djermanovic)4797fb2修复:[arrow-body-style](/docs/rules/arrow-body-style)在对象字面量主体时的崩溃(修复 #12884)(#12886)(Milos Djermanovic)de14d1c修复:wrap-iife 自动修复移除了强制括号 (#12905) (Milos Djermanovic)5775b06修复:可选允许成员名称中使用下划线 (#11972) (Edgardo Avilés)0dfc3ff修复:在 no-eval 中的报告中添加结束位置 (#12960) (Milos Djermanovic)
文档
🌐 Documentation
b8e20d3文档:提到 TypeScript 的编译器检查 (#12903) (Benny Neugebauer)e997f32文档:更新 arrow-parens 以修复小语法问题 (#12962) (Tom)cf14355文档:修复自定义解析器文档的链接 (#12965) (Brandon Mills)f479f6f文档:引用正确的配置文件名 (#12885) (Patrick Kilgore)8d5c434文档:修复网站生成的分类描述(修复 #12894)(#12930) (Kai Cataldo)05380e6文档:从文档中删除关于分号的说明 (#12944) (Luke Sikina)
