chore: arreglar MINOR mecanicos de SonarCloud#48
Merged
Conversation
Sustituciones automaticas que no cambian comportamiento: - S7764 (54): window.X -> globalThis.X (tests/setup, theme, hooks, components) - S4325 (12): assertions redundantes (!) reescritas o eliminadas - S7773 (5): parseInt/parseFloat/isNaN -> Number.parseInt/parseFloat/isNaN - S7781 (4): String#replace global -> String#replaceAll - S6353 (2): regex [a-zA-Z0-9_] -> \w - S6759 (2): props inline marcadas como Readonly - S7755 (1): arr[arr.length-1] -> arr.at(-1) 30 archivos tocados. Quedan los MINOR que requieren criterio (S7735 condiciones negadas y S6551 stringificacion de Error) para una segunda pasada. tsc limpio (salvo el error pre-existente de ReadingMeasureUnit en ReadingList.tsx) y vitest 60/60 verde.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
3 tasks
DevOtter97
added a commit
that referenced
this pull request
May 2, 2026
chore: arreglar S7741 introducidos en #48
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.



Resumen
Sustituciones mecanicas que arreglan ~80 issues MINOR de SonarCloud sin cambiar comportamiento. Continuacion natural de #46 (bugs/critical) y #47 (MAJOR a11y/cleanup).
Reglas arregladas
window.X→globalThis.X!) redundantes refactorizadasparseInt/parseFloat/isNaN→Number.*String#replace(/.../g, ...)→String#replaceAll[a-zA-Z0-9_]→\wReadonly<>arr[arr.length - 1]→arr.at(-1)Lo que NO entra (queda para una segunda pasada)
if (!x) A else B→if (x) B else A). Requiere criterio caso a caso.errse stringifica como[object Object]enReadingForm.tsx:193— fix real, no mecanico.FirebaseAuthService.ts:226yPublicListView.tsx:54— decidir si arreglarlos o// NOSONAR.Test plan
npx tsc --noEmit— limpio salvo el error pre-existente deReadingMeasureUnitenReadingList.tsxnpm run test:run— 60/60 tests pasando