Skip to content

fix(create-plugin): support @grafana/eslint-config v10 in scaffold - #2873

Merged
L2D2Grafana merged 3 commits into
mainfrom
l2d2/chore-create-plugin-update-eslint
Sep 22, 2026
Merged

L2D2Grafana merged 3 commits into
mainfrom
l2d2/chore-create-plugin-update-eslint

Conversation

@L2D2Grafana

Copy link
Copy Markdown
Contributor

Summary 📝

Test 🧪

  • npm run test -w @grafana/create-plugin -- --run (309 passed, including 6 new tests for the migration)
  • npm run typecheck -w @grafana/create-plugin and npm run lint -w @grafana/create-plugin
  • Scaffolded a fresh app plugin from the built CLI, ran npm install && npm run lint — passes cleanly with @grafana/eslint-config@10.0.0 (previously crashed)
  • Ran create-plugin update against an existing plugin (logs-drilldown) and confirmed the migration rewrites .config/eslint.config.mjs and package.json as expected

🤖 Generated with Claude Code

@L2D2Grafana
L2D2Grafana requested a review from a team as a code owner September 11, 2026 19:10
@L2D2Grafana
L2D2Grafana requested review from ashharrison90 and jackw and removed request for a team September 11, 2026 19:10
@cla-assistant

cla-assistant Bot commented Sep 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Sep 11, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Sep 11, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jackw jackw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @L2D2Grafana. Can you fix the version in migrations.ts please then we should be good to merge.

},
{
name: '014-eslint-config-v10',
version: '7.10.2',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really need to fix this but... please could you sync this branch with main and then update this version to 7.11.1 to guarantee it'll run in next release version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

L2D2Grafana and others added 3 commits September 22, 2026 08:25
@grafana/eslint-config@10.0.0 removed the ./flat.js subpath export,
so the scaffolded .config/eslint.config.mjs crashed with
ERR_PACKAGE_PATH_NOT_EXPORTED. Update the template to import from the
package root and bump devDependencies (@stylistic/eslint-plugin-ts ->
@stylistic/eslint-plugin, eslint-plugin-react-hooks) to satisfy the
new peer requirements. Add migration 014-eslint-config-v10 so existing
plugins get the same fix via `create-plugin update`.

Fixes: #2871

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The 014-eslint-config-v10 migration bumped @grafana/eslint-config,
@stylistic/eslint-plugin, and eslint-plugin-react-hooks, but left
eslint-config-prettier at ^8.8.0 (set by an earlier migration).
@grafana/eslint-config@10.0.0 requires eslint-config-prettier
>=9.1.0, so npm install failed with ERESOLVE on plugins that hadn't
already picked up a newer eslint-config-prettier by other means.

Caught by the "Test create-plugin update command" CI job, which runs
the full migration chain against a plugin scaffolded with the oldest
supported create-plugin version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@L2D2Grafana
L2D2Grafana force-pushed the l2d2/chore-create-plugin-update-eslint branch from 0fbfd98 to 022e348 Compare September 22, 2026 15:28

@jackw jackw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Took it for a spin locally and working as expected.

Image

@L2D2Grafana
L2D2Grafana merged commit 67f6fec into main Sep 22, 2026
33 checks passed
@L2D2Grafana
L2D2Grafana deleted the l2d2/chore-create-plugin-update-eslint branch September 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚀 Done

Development

Successfully merging this pull request may close these issues.

Bug: eslint.config.mjs scaffold still imports removed @grafana/eslint-config/flat.js subpath (breaks on eslint-config v10)

3 participants