Skip to content

feat(eslint): support modules imported with import attributes in Rollup 5 - #2066

Open
lukastaegert wants to merge 1 commit into
masterfrom
feat/rollup-5/eslint
Open

lukastaegert wants to merge 1 commit into
masterfrom
feat/rollup-5/eslint

Conversation

@lukastaegert

Copy link
Copy Markdown
Member

Rollup Plugin Name: eslint

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes
  • no

Breaking Changes?

  • yes
  • no

List any relevant issue numbers:

#2037

Description

Rollup 5 appends an encoded ?attributes=... suffix to the id of every module imported with import attributes, so hooks that ran on foo.js now see foo.js?attributes=%7B%22type%22%3A%22json%22%7D.

Filtering is handled by @rollup/pluginutils 5.6.0, whose createFilter now strips the attribute suffix, so the plugin depends on that version. The remaining id uses are the ones that reach ESLint: isPathIgnored and lintFiles were handed the encoded id and failed with No files matching '...target.js?attributes=...' were found.

They now receive the normalized raw id. The test lints a file imported with attributes and fails without the change.

…up 5

Rollup 5 appends an encoded attributes suffix to module ids. The file paths handed to ESLint now use the rawId passed to the transform hook instead, so modules imported with import attributes are linted like their plain counterparts.
Filters keep the hook id because @rollup/pluginutils 5.6.0 strips the same suffix in createFilter; the plugin now requires @rollup/pluginutils ^5.6.0.
The test passes the attribute-encoded id together with rawId, while Rollup 1-4 call the transform hook with two arguments only.
@lukastaegert
lukastaegert marked this pull request as ready for review December 3, 2026 12:23
@greptile-apps

greptile-apps Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Reviews (1) · Last reviewed commit: "feat(eslint): support modules imported w..." · Reviewed by Greptile

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.

1 participant