fix(create-plugin): support @grafana/eslint-config v10 in scaffold - #2873
Open
L2D2Grafana wants to merge 3 commits into
Open
L2D2Grafana wants to merge 3 commits into
L2D2Grafana wants to merge 3 commits into
Conversation
@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
requested review from
ashharrison90 and
jackw
and removed request for
a team
September 11, 2026 19:10
|
|
1 similar comment
|
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary 📝
.config/eslint.config.mjsimported@grafana/eslint-config/flat.js, a subpath removed in@grafana/eslint-config@10.0.0, crashingeslintwithERR_PACKAGE_PATH_NOT_EXPORTED. New scaffolds now import from@grafana/eslint-configdirectly and pin^10.0.0, with@stylistic/eslint-plugin-tsswapped for the@stylistic/eslint-pluginpeer dependency it now requires.014-eslint-config-v10so existing plugins get the same fix viacreate-plugin update.Test 🧪
npm run test -w @grafana/create-plugin -- --run(309 passed, including 6 new tests for the migration)npm run typecheck -w @grafana/create-pluginandnpm run lint -w @grafana/create-pluginnpm install && npm run lint— passes cleanly with@grafana/eslint-config@10.0.0(previously crashed)create-plugin updateagainst an existing plugin (logs-drilldown) and confirmed the migration rewrites.config/eslint.config.mjsandpackage.jsonas expected🤖 Generated with Claude Code