Skip to content

refactor: clear all ESLint warnings - #604

Merged
MaksymStoianov merged 2 commits into
developfrom
chore/eslint-warnings
Nov 18, 2026
Merged

MaksymStoianov merged 2 commits into
developfrom
chore/eslint-warnings

Conversation

@MaksymStoianov

Copy link
Copy Markdown
Member

npx eslint . goes from 285 warnings to 0 (OpenSSF Best Practices warnings_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-comment with allowInterfaceStart, allowEnumStart, allowTypeStart, allowModuleStart (the core rule asked for blank lines Prettier removes).
  • security/detect-object-injection off — keys come from code, not request input; CodeQL covers prototype pollution.
  • config/eslint/scripts.ts now also covers docs/**/*.{js,mjs,cjs} (authoring inputs) and turns off detect-unsafe-regex / detect-non-literal-regexp for tooling that reads repository files.

Code

  • Complex conditions and calculations in template strings moved into named variables; deep nesting split into helpers (appendColumns, parseJson, verify-examples).
  • Regexes rewritten into equivalent forms the safe-regex check accepts (parseA1Notation, isEmail, parseJson, getByteSize) — compared on 300k random strings (matches and named groups identical).
  • Single-line JSDoc expanded, test return types added, unused imports / dead widget() / stale eslint-disable removed; renderPage takes an options object.
  • Two justified inline no-console disables in catch blocks that would otherwise fail silently (isAdmin, sortSheets).

Checks (local)

eslint 0/0 · type:check · npm test 2545 passed · build · format · docs:check (0 files written) · docs:check-i18n · verify-examples output byte-identical · reuse lint.

Note: npm run docs:author on develop already rewrites ~86 docs/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.

MaksymStoianov and others added 2 commits November 18, 2026 01:36
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>
@MaksymStoianov
MaksymStoianov merged commit 8d855d6 into develop Nov 18, 2026
19 checks passed
@MaksymStoianov
MaksymStoianov deleted the chore/eslint-warnings branch November 18, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant