Skip to content

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

Open
L2D2Grafana wants to merge 3 commits into
mainfrom
l2d2/chore-create-plugin-update-eslint
Open

L2D2Grafana wants to merge 3 commits into
mainfrom
l2d2/chore-create-plugin-update-eslint

Conversation

@L2D2Grafana

Copy link
Copy Markdown

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

@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>
@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.

L2D2Grafana and others added 2 commits September 11, 2026 12:36
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>
…gin-update-eslint

# Conflicts:
#	packages/create-plugin/templates/common/_package.json
@grafana-catalog-project-bot grafana-catalog-project-bot Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 In review

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)

1 participant