Skip to content

feat: remove legacy config and make package esm#71

Open
jackw wants to merge 9 commits intomasterfrom
jackw/esm-flat-config-only
Open

feat: remove legacy config and make package esm#71
jackw wants to merge 9 commits intomasterfrom
jackw/esm-flat-config-only

Conversation

@jackw
Copy link
Contributor

@jackw jackw commented Mar 5, 2026

This PR removes legacy config support in favour of flat config (which has been available since v8.57 of Eslint) and makes the package ESM only.

It also tinkers with the react-hooks rules to make for easier adoption in larger projects (such as grafana/grafana where we get over 600 errors).

fixes: #70
fixes: #45

@jackw jackw self-assigned this Mar 5, 2026
@jackw jackw requested a review from a team as a code owner March 5, 2026 17:18
@jackw jackw requested a review from Ukochka March 5, 2026 17:18
@grafana-plugins-platform-bot grafana-plugins-platform-bot bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Mar 5, 2026
"eslint-config-prettier": ">=8.8.0",
"eslint-plugin-jsdoc": ">=46.8.0",
"eslint-plugin-react": ">=7.33.0",
"@stylistic/eslint-plugin": ">=5.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ goodbye deprecation warning message?

Comment on lines +102 to +111
// disable the following react-hooks rules for easy adoption in grafana/grafana
"react-hooks/refs": "off",
"react-hooks/set-state-in-effect": "off",
"react-hooks/immutability": "off",
"react-hooks/preserve-manual-memoization": "off",
"react-hooks/purity": "off",
"react-hooks/static-components": "off",
"react-hooks/use-memo": "off",
"react-hooks/incompatible-library": "off",
"react-hooks/unsupported-syntax": "off",
Copy link
Contributor

Choose a reason for hiding this comment

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

Side thought: Could we leave them on, but disable only in the grafana/grafana repo? So anyone else using this will get them turned on?

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
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.

Migrate to main @stylistic/eslint-plugin away from deprecated @stylistic/eslint-plugin-ts Upgrade @grafana/eslint-config/flat.js to ESM module

2 participants