From d0740d9f00467246d942ad8645198af075613ba7 Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Fri, 21 Feb 2025 23:24:14 +0100 Subject: [PATCH] docs: Publish v9.21.0 release highlights (#696) --- .../2025-02-21-eslint-v9.21.0-released.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/content/blog/2025-02-21-eslint-v9.21.0-released.md b/src/content/blog/2025-02-21-eslint-v9.21.0-released.md index 482f0ec05..b3ef6e5db 100644 --- a/src/content/blog/2025-02-21-eslint-v9.21.0-released.md +++ b/src/content/blog/2025-02-21-eslint-v9.21.0-released.md @@ -3,9 +3,8 @@ layout: post title: ESLint v9.21.0 released teaser: "We just pushed ESLint v9.21.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release." image: release-notes-minor.png -draft: true authors: - - eslintbot + - fasttime categories: - Release Notes tags: @@ -13,8 +12,26 @@ tags: --- +## Highlights +### `--ext` CLI Option +This version of ESLint reintroduces the command line option `--ext` to allow linting files with a particular extension. +The `--ext` option has always been available in the legacy "eslintc" configuration system, but it was eliminated in the new configuration system because its functionality can be easily achieved through [`files`](/docs/latest/use/configure/configuration-files#specifying-files-and-ignores) patterns. +For example, specifying `files: ["**/*.ts"]` in a configuration object will lint all files that have the `.ts` extension. +`files` patterns are useful to lint files with extensions other than `.js`, `.mjs` or `.cjs`, but they require a configuration file. In order to lint files with arbitrary extensions without a configuration file, the `--ext` option can now be used in the command line like this: + +```shell +npx eslint --no-config-lookup --rule '{"no-unused-vars": "error"}' --ext '.jsx' +``` + +See the [CLI documentation](/docs/latest/use/command-line-interface#--ext) for further information. + +### New Metadata for Deprecated Rules + +ESLint v9.21.0 extends the format of rule metadata to better annotate deprecated rules, providing more detailed information. +This includes the specific version of a plugin in which a rule was deprecated, as well as links to alternative rules and plugins. +[Learn more](/docs/latest/extend/rule-deprecation).