Skip to content

Clean up lint and adopt project JSDoc style#50

Merged
jeremyfelt merged 1 commit into
trunkfrom
lint-cleanup
Jun 10, 2026
Merged

Clean up lint and adopt project JSDoc style#50
jeremyfelt merged 1 commit into
trunkfrom
lint-cleanup

Conversation

@jeremyfelt

Copy link
Copy Markdown
Member

What

npm run lint previously reported 29 warnings; it now exits clean, with the project's style conventions enforced by config rather than convention.

eslint config

  • no-console: allows log/warn/error in bin/** and src/** — console output is the CLI's user interface there. The noisier debugging methods (debug, info, table, …) stay flagged, and templates/ (browser-side) keeps the stricter shared rule.
  • jsdoc/require-hyphen-before-param-description: never: no more - between a param name and its description, autofixed across the codebase.
  • jsdoc/check-line-alignment: always (params/properties only): types, names, and descriptions align in columns within each block. @returns is deliberately excluded — blocks like groupViewportsByScaleFactor have long return types that would otherwise drag every description out to column ~75.

Fixes

  • Filled in the three missing JSDoc descriptions (detectStaleControls returns, generateHtmlDiff returns, setSliderPosition param).

Example domains (extra credit)

  • All remaining vendor/service-specific hostnames in the README, reglance.example.json, config error hints, and tests now use reserved example domains (captcha.example.com, cdn.example.net, example.com), and the README's CAPTCHA mention no longer names a vendor.

Verification

  • npm run lint: 0 problems.
  • npm test: 105 passing.
  • git grep confirms no vendor/client hostnames remain outside package-lock.json.

🤖 Generated with Claude Code

npm run lint now exits with zero problems, and the style points that
were previously just convention are enforced by config:

- no-console allows log/warn/error in bin/ and src/, where console
  output is the CLI's user interface. Templates ship to the browser
  and keep the shared rule.
- JSDoc params drop the hyphen before descriptions
  (require-hyphen-before-param-description: never) and align types,
  names, and descriptions in columns (check-line-alignment, params
  only — a long @returns type would drag every description far right).
- The three missing JSDoc descriptions are filled in.

Also replaces the remaining vendor-specific hostnames in docs, error
hints, and tests with reserved example domains (captcha.example.com,
cdn.example.net).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeremyfelt
jeremyfelt merged commit aa61fd1 into trunk Jun 10, 2026
2 checks passed
@jeremyfelt
jeremyfelt deleted the lint-cleanup branch June 10, 2026 18:39
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