Clean up lint and adopt project JSDoc style#50
Merged
Merged
Conversation
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>
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.
What
npm run lintpreviously reported 29 warnings; it now exits clean, with the project's style conventions enforced by config rather than convention.eslint config
no-console: allowslog/warn/errorinbin/**andsrc/**— console output is the CLI's user interface there. The noisier debugging methods (debug,info,table, …) stay flagged, andtemplates/(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.@returnsis deliberately excluded — blocks likegroupViewportsByScaleFactorhave long return types that would otherwise drag every description out to column ~75.Fixes
detectStaleControlsreturns,generateHtmlDiffreturns,setSliderPositionparam).Example domains (extra credit)
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 grepconfirms no vendor/client hostnames remain outsidepackage-lock.json.🤖 Generated with Claude Code