chore(eslint): migrate to eslint 9 and flat file configs#1848
chore(eslint): migrate to eslint 9 and flat file configs#1848hanneskuettner wants to merge 1 commit intoclauderic:experimentalfrom
Conversation
|
@dnd-kit/abstract
@dnd-kit/collision
@dnd-kit/dom
@dnd-kit/geometry
@dnd-kit/helpers
@dnd-kit/react
@dnd-kit/state
commit: |
| "@dnd-kit/abstract": "^0.1.21", | ||
| "@dnd-kit/geometry": "^0.1.21", |
There was a problem hiding this comment.
Haven't worked with bun a lot, is this normal that these are bumped now in the lock file? I would have expected them to use the workspace protocol and automatically get back-filled on release?
clauderic
left a comment
There was a problem hiding this comment.
Summary
This PR migrates ESLint from v8 (legacy .eslintrc.js format) to v9 flat config format. It removes the broken @dnd-kit/eslint-config internal package, introduces co-located eslint.config.js files in packages that need custom rules, and creates a shared React config at config/eslint/react.config.js.
Feedback
Suggestions
- The PR is large (1025 lines), but the bulk of this is
bun.lockupdates — the actual config changes are modest and well-organized. - The PR description mentions using
--flag v10_config_lookup_from_fileas an experimental ESLint feature. It would be helpful to add a comment in the rootpackage.jsonlint script (or in a README/contributing note) explaining that this flag is required and when it can be dropped (once ESLint v10 stabilizes this behavior), so future maintainers understand the dependency. - The author notes linting is intentionally configured to be permissive initially to avoid noise. It would be good to track follow-up work (e.g., a separate issue or TODO) to re-evaluate the disabled/warned rules over time.
Changeset
- Status: not present — correct, no
packages/*/src/files were modified.
Overall
Clean and well-scoped migration. The flat config structure is sensible (root config → per-package configs), and the decision to start with relaxed rules to get lint running cleanly first is pragmatic. Thanks for doing this work, @hanneskuettner!
[claude-review]
Summary
Migrate ESLint from v8 (legacy
.eslintrc.js) to v9 flat config with co-located package config and make use of a single workspaceeslint.config.js.Before this PR it looks like no lint actually ran?
Changes:
@dnd-kit/eslint-configpackage (configs were broken/missing which might be the reason why no proper lint ran)config/eslint/react.config.jsfor reuse acrossreactandstoriespackagepackage.jsonfiles where they're actually used and removeeslintfrom individual packages--flag v10_config_lookup_from_filefor proper config resolution per package (this can be removed as soon as it stabilized in eslint v10Structure:
vue,svelteetc)