Move to ESLint 10 and @microbit/eslint-config 0.2.1 - #147
Merged
Conversation
eslint-react reports eleven things in the demo app that the old plugin did not. Three are real: Serial and UART both cap their log at 200 lines with slice(-200), so every append past the cap shifts each remaining line down an index. Keying by index there means React rewrites the text of reused nodes instead of matching lines to nodes. Harmless for plain text, wrong the moment a row holds focus or state, so both now carry a line id. PinsTab built a Set or Map on every render to seed state it only uses once. Lazy initialisers. The rest are the LED grids and the flash timings table, where the index really is the identity: a fixed 5x5 matrix and an append-only list. Disabled at the four sites with a reason. npm cannot resolve this bump in one step. The lockfile pins the old shared config with its eslint ^9.7 peer and npm tries to reconcile that rather than replace it, failing with a circular ERESOLVE. Uninstall eslint and @microbit/eslint-config first, then install the new pair.
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.
eslint-react reports eleven things in the demo app that the old plugin did not. Three are real:
Serial and UART both cap their log at 200 lines with slice(-200), so every append past the cap shifts each remaining line down an index. Keying by index there means React rewrites the text of reused nodes instead of matching lines to nodes. Harmless for plain text, wrong the moment a row holds focus or state, so both now carry a line id.
PinsTab built a Set or Map on every render to seed state it only uses once. Lazy initialisers.
The rest are the LED grids and the flash timings table, where the index really is the identity: a fixed 5x5 matrix and an append-only list. Disabled at the four sites with a reason.
npm cannot resolve this bump in one step. The lockfile pins the old shared config with its eslint ^9.7 peer and npm tries to reconcile that rather than replace it, failing with a circular ERESOLVE. Uninstall eslint and @microbit/eslint-config first, then install the new pair.