ESLint v10.0.0-rc.1 已发布

我们刚刚发布了 ESLint v10.0.0-rc.1,这是 ESLint 的一个小版本升级。此版本添加了一些新功能,并修复了先前版本中发现的几个错误。

亮点

🌐 Highlights

此版本的 ESLint 尚未准备好用于生产环境,提供此版本是为了在发布最终版本之前收集社区的反馈。如果你遇到任何问题或有任何反馈,请通过在我们的 GitHub 仓库 创建问题告诉我们。

🌐 This version of ESLint is not ready for production use and is provided to gather feedback from the community before releasing the final version. Please let us know if you have any problems or feedback by creating issues on our GitHub repo.

请注意,这个 ESLint 的预发布版本有一个独立的文档部分

🌐 Note that this prerelease version of ESLint has a separate documentation section.

Espree 和 ESLint Scope 现在包括类型

🌐 Espree and ESLint Scope now include types

Espree v11.1.0ESLint Scope v9.1.0 开始,这些包现在包含内置类型定义。

🌐 Beginning with Espree v11.1.0 and ESLint Scope v9.1.0, these packages now contain built-in type definitions.

以前,类型定义由 Definitely Typed 包 @types/espree@types/eslint-scope 提供。旧类型定义和新类型定义之间有一些差异,主要是错误修复。如果你的代码依赖于 Espree 和 ESLint Scope 包的类型,请检查是否需要进行任何更新。

🌐 Previously, type definitions were provided by Definitely Typed packages @types/espree and @types/eslint-scope. There are several differences between the old and new type definitions, mostly bug fixes. If your code relies on types for the Espree and ESLint Scope packages, check if there are any updates needed.

正在安装

🌐 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@10.0.0-rc.1 --save-dev

迁移指南

🌐 Migration Guide

由于有很多变化,我们创建了一个 迁移指南,详细描述了重大更改以及你应该采取的应对步骤。我们预计大多数用户应该能够在不更改构建的情况下升级,但如果遇到问题,迁移指南应该是一个有用的资源。

🌐 As there are a lot of changes, we’ve created a migration guide describing the breaking 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.

特性

🌐 Features

  • 43677de 功能:修复在 no-shadow 中处理函数和类表达式名称的问题 (#20432) (Milos Djermanovic)

错误修复

🌐 Bug Fixes

  • b34b938 修复:使用 Error.prepareStackTrace 估算失败测试位置 (#20436) (Francesco Trotta)
  • 51aab53 修复:更新 eslint (#20443) (renovate[bot])
  • 23490b2 修复:处理 RuleTester 位置估计中冒号前的空格 (#20433) (Francesco Trotta)
  • f244dbf 修复:从 @eslint/core 使用 MessagePlaceholderData 类型 (#20348) (루밀LuMir)

文档

🌐 Documentation

  • 3e5d38c 文档:在规则示例中添加缺失的缩进空格 (#20446) (fnx)
  • 63a0c7c 文档:更新自述文件(GitHub Actions 机器人)

杂项

🌐 Chores

最新的 ESLint 新闻、案例研究、教程和资源。

ESLint v10.3.0 发布
1 min read

ESLint v10.3.0 发布

我们刚刚发布了 ESLint v10.3.0,这是 ESLint 的一次小版本升级。此版本添加了一些新功能,并修复了上一版本中发现的几个错误。

ESLint v10.2.1 发布
1 min read

ESLint v10.2.1 发布

我们刚刚发布了 ESLint v10.2.1,这是 ESLint 的一个补丁版本升级。本次发布修复了上一版本中发现的几个错误。

ESLint v10.2.0 发布
2 min read

ESLint v10.2.0 发布

我们刚刚发布了 ESLint v10.2.0,这是 ESLint 的一次小版本升级。此版本添加了一些新功能,并修复了上一版本中发现的几个错误。