Repository navigation
fix(linter/unicorn/no-useless-undefined): report guarded indexed access - #29014
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Codex Review Summary: β CompletedThis comment shows the latest Codex review activity on this pull request.
βΉοΈ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with π while any review is running, comments if it has suggestions, and reacts with π once all reviews finish with no findings. |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b1972a129
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
β¦ss (#29014) Report redundant `undefined` branches in bounds guards such as `i >= 0 ? a[i] : undefined`, including equivalent upper bounds and offset indices, matching Unicorn. Offer suggestions that preserve TypeScript assertions, while excluding side effects and withholding replacements that would remove comments or change reference behavior. Fixes #28988
6dc3963 to
2487360
Compare
# Oxlint ### π Features - 6195265 linter/promise/prefer-catch: Implement suggestion (#28919) (Mikhail Baev) ### π Bug Fixes - 9c62d2a linter/eslint/no-unreachable-loop: Ignore enclosing finalizers for continues (#29004) (camc314) - 6303df1 jsdoc: Preserve param tags after unmatched description delimiters (#28923) (Vishal Punjabi) - fe66fa7 linter/eslint/no-lone-blocks: Report redundant blocks in function bodies (#29043) (camc314) - e1694bd linter/unicorn/no-useless-undefined: Preserve shadowed bindings (#29046) (camc314) - 791b5f5 linter/unicorn/prefer-regexp-test: Restrict automatic argument swaps (#29045) (camc314) - e7654f6 linter/react/display-name: Ignore unrelated memo and forwardRef calls (#29005) (camc314) - 2487360 linter/unicorn/no-useless-undefined: Report guarded indexed access (#29014) (camc314) - a791a5b cfg: Resolve continues through stacked loop labels (#29016) (camc314) - 287ba19 linter/eslint/id-length: Ignore TypeScript qualified references (#29037) (camc314) - b71234f cfg: Skip labeled contexts for unlabeled jumps (#29001) (camc314) - bb21a3c linter/import/no-anonymous-default-export: Report parenthesized exports (#29002) (camc314) - f38f738 linter/eslint/prefer-destructuring: Skip fixes that remove comments (#29003) (camc314) - bf11006 linter/react/exhaustive-deps: Suggest dependency removals (#28925) (camc314) - 6bbb92a linter: Remove unused `oxlint-disable` directives with `--fix` (#27698) (Ryan Tsao) - 3b35cb6 linter/disable-directives: Preserve separators and disable spans (#28921) (camc314) - 1253445 linter/eslint/no-restricted-imports: Report re-exported imports once (#28920) (Ramy Akin Saidi) ### β‘ Performance - da620e6 linter: Start tsgolint before the regular lint pass (#28824) (Max Schwenk) # Oxfmt ### π Bug Fixes - 449e91f oxfmt: Format ts-in-astro as TSX (#29080) (leaysgur) - 8d8845e formatter/jsdoc: Strip `*` prefixes from multiline default value (#28910) (leaysgur) - cdb1501 formatter/jsdoc: Handle every line terminator in multi-line JSDoc types (#28909) (leaysgur) - fd51bff jsdoc: Handle every line terminators as newline (#28902) (leaysgur) - 2f80765 formatter_toml: Format whitespace-only document to empty (#28899) (leaysgur) - 5e1e02c formatter_graphql: Allow empty document (#28898) (leaysgur) - 06e72c0 formatter/tailwind: Normalize CR in Tailwind template with `preserveWhitespace` (#28896) (leaysgur) ### β‘ Performance - 934ca98 formatter: Use `Arc` for tailwind options across embedding (#29079) (leaysgur) - dde9c5c formatter_htmlish: Skip `</script` escape if possible (#29078) (leaysgur) - dc4d918 formatter: Format embedded expr of one name without parsing (#29077) (leaysgur) ### π Documentation - eb2eb2d formatter_htmlish: Cover block elements in `DIVERGENCES.md#interpolation-element-as-text` (#28901) (leaysgur) - 0f4ec80 formatter/tailwind: Note Tailwind sorting tears escaped whitespace apart (#28900) (leaysgur)
Report redundant
undefinedbranches in bounds guards such asi >= 0 ? a[i] : undefined, including equivalent upper bounds and offset indices, matching Unicorn.Offer suggestions that preserve TypeScript assertions, while excluding side effects and withholding replacements that would remove comments or change reference behavior.
Fixes #28988