chore(lint): make the ESLint ratchet pass on master again, and tighten it to 99 (#627) - #891
Open
alex-dembele wants to merge 5 commits into
Open
alex-dembele wants to merge 5 commits into
alex-dembele wants to merge 5 commits into
Conversation
Three regex classes held literal U+00A0, U+202F, U+200E and U+200F, the spaces and direction marks French number formatting emits. They are intentional, but no-irregular-whitespace flagged them and the ratchet failed on a clean master. Written as \u escapes, the regexes match exactly what they matched before; the characters are not replaced with plain spaces, and a reader can now see which ones are meant. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
Leftovers from panels that moved out of this file. Import removal only; nothing else in the file changes. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
PersonalizeCard drew its two accent swatches with literal colours, #0a84ff and #7c6cff, which matched neither theme's accent and broke openrisk/no-raw-colors. tokens.css already defines --swatch-azure and --swatch-iris for exactly this, mirroring each variant's accent per theme. The swatches now show the colour the accent will actually be. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
…ender (#627) Writing ref.current during render is what react-hooks/refs forbids: a render React throws away still mutates the ref. The layout effect runs after every commit and before any later keydown, so the listener keeps seeing the latest handlers. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
The fixes in this branch, plus debt paid down on master since the last freeze, put six rules under their ceiling. Re-frozen with npm run lint:ceiling -- --update; every number only went down, and no-irregular-whitespace is now enforced at zero. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
Open
4 tasks
This was referenced Oct 2, 2026
Open
This branch has not been deployed
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.
Closes #627
npm run lint:ceiling, the blocking ESLint gate in CI, fails on a cleanmaster(14f26e8e). Four rules are over their ceiling, so every frontend PR is red for reasons it did not cause:What changes (one commit per fix)
no-irregular-whitespace: ine2e/empty-states.spec.ts,i18n/__tests__/format.test.tsandtranslate.test.ts, the intentional U+00A0, U+202F, U+200E and U+200F inside the regex classes are now written as\uescapes. Same regexes, same matches, and nothing is replaced by a plain space, as chore(frontend): lint:ceiling fails on a clean master — stale no-irregular-whitespace count #627 criterion 2 requires. The rule is enforced at zero from now on.no-unused-vars: fifteen unused imports removed fromSettingsScreen.tsx. Import removal only.no-raw-colors:PersonalizeCarddrew the accent swatches with#0a84ffand#7c6cff, which matched neither theme's accent. It now uses the existing--swatch-azureand--swatch-iristokens, which mirror each variant's real accent per theme. This is a visible change: each swatch now shows the colour the accent will actually be.react-hooks/refs:useHotkeysupdates its handler ref in a layout effect instead of during render.TagInput's ref write stays inside the frozen debt.npm run lint:ceiling -- --update, from 132 down to 99. Every number only went down. That includes debt paid on master since the last freeze.Verification
Live, on this branch against a local backend, in Settings → General: the page loads without errors after the import removal. The swatches compute to the variant accents:
rgb(11,96,185)in light,rgb(79,155,255)in dark;rgb(91,70,201)in light,rgb(157,144,255)in dark.Not done
e2e/empty-states.spec.tswas edited (escape only), but I did not run the Playwright e2e suite.eslint .still reports 99 errors. Those are the frozen debt, which this PR does not touch beyond the four rules above.