Skip to content

Conversation

emersion
Copy link
Contributor

Rollup Plugin Name: eslint

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

ESLint v8.57 has added a new loadESLint() function to load the correct ESLint class (either one reading legacy configs, either one reading flat configs).

See:

Unfortunately @types/eslint is missing v8.57 and has been removed entirely from the DefinitelyType repository (since upstream now ships type definitions). As a result we need to manually declare the type of the loadESLint() function.

Additionally, loadESLint() is async, so we can't call it at plugin initialization time. Instead, we call it the first time we need it.

See also these issues:

ESLint v8.57 has added a new loadESLint() function to load the
correct ESLint class (either one reading legacy configs, either
one reading flat configs).

See:

- https://eslint.org/docs/v8.x/integrate/nodejs-api#loadeslint
- eslint/eslint@1120b9b

Unfortunately @types/eslint is missing v8.57 and has been removed
entirely from the DefinitelyType repository (since upstream now
ships type definitions). As a result we need to manually declare
the type of the loadESLint() function.

Additionally, loadESLint() is async, so we can't call it at plugin
initialization time. Instead, we call it the first time we need it.
@emersion
Copy link
Contributor Author

emersion commented Oct 3, 2025

Hi @shellscape, would you have time to look at this PR by any chance? Thanks!

@shellscape shellscape merged commit e575d79 into rollup:master Oct 4, 2025
3 of 5 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting merge to Done in Board PI 17 Oct 4, 2025
@emersion emersion deleted the eslint-flat-config branch October 4, 2025 16:33
@emersion
Copy link
Contributor Author

emersion commented Oct 4, 2025

Thank you!

emersion added a commit to OpenRailAssociation/osrd that referenced this pull request Oct 4, 2025
This is required to get support for flat config files:
rollup/plugins#1898

Signed-off-by: Simon Ser <[email protected]>
github-merge-queue bot pushed a commit to OpenRailAssociation/osrd that referenced this pull request Oct 4, 2025
This is required to get support for flat config files:
rollup/plugins#1898

Signed-off-by: Simon Ser <[email protected]>
github-merge-queue bot pushed a commit to OpenRailAssociation/osrd that referenced this pull request Oct 4, 2025
This is required to get support for flat config files:
rollup/plugins#1898

Signed-off-by: Simon Ser <[email protected]>
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.

2 participants