docs(lint): add pages for oxc-correctness rule ports#3378
Open
bartlomieju wants to merge 1 commit into
Open
Conversation
Adds documentation pages for the oxc-correctness batch of oxlint rule ports: erasing-op (implemented in denoland/deno_lint#1521) plus the remaining bucket (const-comparisons, double-comparisons, bad-char-at-comparison, bad-comparison-sequence, bad-min-max-func, bad-object-literal-comparison, bad-replace-all-arg, bad-array-method-on-arguments, missing-throw, number-arg-out-of-range, only-used-in-recursion, uninvoked-array-callback). Pages follow the existing lint/rules format and are tagged recommended, matching oxc's correctness classification (subject to the same on-by-default decision as the rules themselves).
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.
Adds
lint/rulesdocumentation pages for the oxc-correctness batch of oxlintrule ports. These accompany the rule work in
denoland/deno_lint—erasing-opis implemented (denoland/deno_lint#1521) and the rest are documented ahead of
their ports so the spec and the docs land together.
Pages added:
Each follows the existing rule-page format (front-matter tags, a description,
and Invalid/Valid examples) and the sidebar picks them up automatically via
lint/_data.ts. Content is grounded in the upstream oxc rule definitions, withone correction:
bad-replace-all-argdocuments that a non-global regex passedto
replaceAllthrows aTypeError(per the spec), rather than oxc'sdescription that only the first match is replaced.
The pages are tagged
recommended, matching oxc'scorrectnessclassification.If the rules ship opt-in instead, the front-matter tag should be dropped to
match — this tracks the same on-by-default decision as the rules themselves.
Note: a few of these pages describe rules that are not yet implemented in
deno_lint, so the corresponding/lint/rules/<name>entries will appear in thesidebar before the rules are released.