Skip to content

BREAKING: Bump ESLint to ^9.11.1, bump related ESLint dependencies, and rewrite configs to use flat configs#370

Merged
Mrtenz merged 29 commits intomainfrom
mrtenz/eslint-9
Sep 25, 2024
Merged

BREAKING: Bump ESLint to ^9.11.1, bump related ESLint dependencies, and rewrite configs to use flat configs#370
Mrtenz merged 29 commits intomainfrom
mrtenz/eslint-9

Conversation

@Mrtenz
Copy link
Copy Markdown
Member

@Mrtenz Mrtenz commented Sep 22, 2024

ESLint 8 will be end-of-life from 2024-10-05. ESLint 8 introduced a new config format, which is now the default in ESLint 9, and only opt-out through an environment flag. We could enable that flag and keep the current configs, but it's better to just update the configs now and be done with it.

I've updated all configs to use the new format. The most notable changes are:

  • All ESLint-related dependencies are now on the latest version.
  • All configs now use ESM, as this is now supported out-of-the-box in ESLint 9.
  • I've updated the default ECMAScript version to 2022, which is in line with what the MetaMask extension supports.
  • Each config now includes a TypeScript declaration file to support type-checking.

Closes #362.

Breaking changes

All configs

  • All packages are now pure ESM, and cannot be imported from a CJS configuration.
    • ESLint 9 supports ESM configurations out of the box.
  • The minimum ESLint version is now ^9.11.0, and all configs were updated to use the flat config format.
  • All dependencies have been updated, so some rules have been replaced or removed.

@metamask/eslint-config-typescript

  • @typescript-eslint/parser and @typescript-eslint/eslint-plugin are replaced with typescript-eslint@^8.6.0, which is now a peer dependency.
  • For proper linting using type information, languageOptions.parserOptions.tsconfigRootDir must be set to the current directory, e.g., using import.meta.dirname.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint config format is deprecated

2 participants