ESLint v9.30.0 released

We just pushed ESLint v9.30.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

Highlights

basePath property in config objects

Config objects can now include the new basePath property to specify the path to a subdirectory to which the config object should apply to. If a config object has a basePath property, patterns specified in files and ignores are evaluated relative to the subdirectory represented by basePath. This makes it easier to write config objects that target a particular directory inside your project.

// eslint.config.js
import { defineConfig } from "eslint/config";
import js from "@eslint/js";

export default defineConfig([
    {
        basePath: "packages/hello-base-path",
        plugins: { js },
        extends: ["js/recommended"],
        ignores: ["coverage/**", "dist/**"],
    },
]);

You can read more about base paths in config objects in the documentation.

Stable feature flag v10_config_lookup_from_file

With the addition of the basePath property in config objects, the experimental configuration file resolution introduced in ESLint v9.12.0 has been finalized. It will become the default behavior in the next major release of ESLint. Accordingly, the feature flag unstable_config_lookup_from_file has been renamed to v10_config_lookup_from_file. The old flag name still works, so if you are already using unstable_config_lookup_from_file in your setup, you don’t need to take any action.

New allowSeparateTypeImports option in no-duplicate-imports

With the new option allowSeparateTypeImports, the no-duplicate-imports rule can now be configured to treat import and import type as separate usages, even if they specify the same module.

/*eslint no-duplicate-imports: ["error", { "allowSeparateTypeImports": false }]*/

import { someValue } from 'module';
import type { SomeType } from 'module';

Other notable changes

  • The SourceCode method getIndexFromLoc now throws an error if the argument specifies a negative value for the column property.

Features

Bug Fixes

Documentation

Chores

  • 2b6491c chore: upgrade to @eslint/js@9.30.0 (#19889) (Francesco Trotta)
  • 5a5d526 chore: package.json update for @eslint/js release (Jenkins)
  • eaf8a41 chore: Correct typos in linter tests (#19878) (kilavvy)

The latest ESLint news, case studies, tutorials, and resources.

ESLint v9.29.0 released
3 min read

ESLint v9.29.0 released

We just pushed ESLint v9.29.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

How ESLint language plugins enhance DSL usability
2 min read

How ESLint language plugins enhance DSL usability

Unlock the full potential of your domain-specific language by seamlessly integrating ESLint plugins to boost consistency, usability, and developer adoption.

ESLint v9.28.0 released
2 min read

ESLint v9.28.0 released

We just pushed ESLint v9.28.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.