ESLint v10.3.0 发布

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

亮点

🌐 Highlights

no-unused-private-class-members 建议

🌐 no-unused-private-class-members Suggestions

[no-unused-private-class-members](/docs/latest/rules/no-unused-private-class-members) 规则现在提供 建议 来移除报告的未使用私有类成员。

🌐 The no-unused-private-class-members rule now provides suggestions to remove reported unused private class members.

例如,对于以下代码,其中规则报告 #doSomethingElse 未使用:

🌐 For example, for the following code, in which the rule reports #doSomethingElse as unused:

class C {

    /**
     * My public method.
     */
    doSomething() {
    }

    /**
     * My private method.
     */
    #doSomethingElse() {
    }

}

现在它将建议删除 #doSomethingElse。应用建议后,该方法及相关注释将被删除:

🌐 It will now suggest removing #doSomethingElse. After applying the suggestion, the method and related comment will be removed:

class C {

    /**
     * My public method.
     */
    doSomething() {
    }

}

特性

🌐 Features

错误修复

🌐 Bug Fixes

  • b6ae5cf 修复:处理不可用的 require 缓存 (#20812) (Simon Podlipsky)
  • 6fb3685 修复:规则建议导致类体中继续 (#20787) (Milos Djermanovic)

文档

🌐 Documentation

  • 32cc7ab 文档:修复文档和评论中的拼写错误 (#20809) (Tanuj Kanti)
  • 7f47937 文档:更新自述文件(GitHub Actions 机器人)

杂项

🌐 Chores

  • d32235e ci:在 eslint-flat-config-utils 类型集成测试中使用 pnpm (#20826) (Francesco Trotta)
  • 3ffb14e 事务: 清理评论和 JSDoc 中的拼写错误 (#20821) (Pixel998)
  • 22eb58a 任务:在 ecosystem-tests.yml 中添加缺失的 continue-on-error (#20818) (Josh Goldberg ✨)
  • 88bf002 ci: 将 pnpm/action-setup 从 6.0.1 更新到 6.0.3 (#20815) (dependabot[bot])
  • 97c8c33 事务: 将 ilshidur/action-discord 操作更新至 v0.4.0 (#20811) (renovate[bot])
  • [2f58136`](https://github.com/eslint/eslint/commit/2f58136dd47364a4cae7054a64f7bf1e79693813) 杂务:将 peter-evans/create-pull-request 操作固定到 5f6978f (#20810) (renovate[bot])
  • 77add7f 杂务:添加初始生态系统插件测试工作流程 (#19643) (Josh Goldberg ✨)
  • 4023b55 测试:为 SuppressionsService.prune() 添加单元测试 (#20797) (kuldeep kumar)
  • 54080da 测试:为 ForkContext 添加单元测试 (#20778) (kuldeep kumar)
  • f0e2bcc 测试:为 SuppressionsService.suppress() 方法添加单元测试 (#20765) (kuldeep kumar)
  • a7f0b94 杂务:将依赖 prettier 更新到 v3.8.3 (#20782) (renovate[bot])
  • 7bf93d9 任务:将 TypeScript 更新到 v6 (#20677) (sethamus)
  • b42dd72 ci: 将 pnpm/action-setup 从 6.0.0 更新到 6.0.1 (#20781) (dependabot[bot])
  • 2b252be 测试:为 IdGenerator 添加单元测试 (#20775) (kuldeep kumar)

最新的 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 的一次小版本升级。此版本添加了一些新功能,并修复了上一版本中发现的几个错误。

ESLint v10.1.0 发布
2 min read

ESLint v10.1.0 发布

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