Repository navigation
refactor: clear all ESLint warnings - #604
Merged
Merged
Conversation
npx eslint . goes from 285 warnings to 0 (OpenSSF Best Practices warnings_fixed), with no change to the library's behaviour or to the generated documentation. - lines-around-comment moves to @stylistic/lines-around-comment with allowInterface/Enum/Type/ModuleStart, so it no longer fights Prettier. - security/detect-object-injection off (keys come from code; CodeQL covers prototype pollution); scripts/docs tooling may use non-literal regexes. - Complex conditions and template-string calculations moved into named variables; deep nesting split into helpers; regexes rewritten into equivalent safe-regex forms (checked against random inputs). - Expanded single-line JSDoc, added test return types, removed unused imports, dead code and stale eslint-disable directives; renderPage takes an options object. Two justified inline no-console disables remain in catch blocks whose errors would otherwise be silent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Maksym Stoianov <stoianov.maksym@gmail.com>
They run real git merges in a temporary repository and time out at the 5 s default when the machine is busy, failing pre-push and CI at random. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Maksym Stoianov <stoianov.maksym@gmail.com>
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.
npx eslint .goes from 285 warnings to 0 (OpenSSF Best Practiceswarnings_fixed), same approach as bootgs/boot#176. No change to the library's behaviour or to the generated documentation.Config
lines-around-comment→@stylistic/lines-around-commentwithallowInterfaceStart,allowEnumStart,allowTypeStart,allowModuleStart(the core rule asked for blank lines Prettier removes).security/detect-object-injectionoff — keys come from code, not request input; CodeQL covers prototype pollution.config/eslint/scripts.tsnow also coversdocs/**/*.{js,mjs,cjs}(authoring inputs) and turns offdetect-unsafe-regex/detect-non-literal-regexpfor tooling that reads repository files.Code
appendColumns,parseJson,verify-examples).parseA1Notation,isEmail,parseJson,getByteSize) — compared on 300k random strings (matches and named groups identical).widget()/ staleeslint-disableremoved;renderPagetakes an options object.no-consoledisables in catch blocks that would otherwise fail silently (isAdmin,sortSheets).Checks (local)
eslint0/0 ·type:check·npm test2545 passed ·build·format·docs:check(0 files written) ·docs:check-i18n·verify-examplesoutput byte-identical ·reuse lint.Note:
npm run docs:authoron develop already rewrites ~86docs/content/*/functions/*.json(authored sources older than the edited JSON) — unrelated, left out of this PR.🤖 Generated with Claude Code
Also: the git merge-driver tests (
test/scripts/merge-*.test.ts) get a 30 s timeout — they run real git merges and timed out at the 5 s default on a busy machine.