Skip to content

feat(linter/typescript): implement no-unsafe-enum-assignment rule - #28117

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/no-unsafe-enum-assignment
Oct 23, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
codex/no-unsafe-enum-assignment

Conversation

@camc314

@camc314 camc314 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Register typescript/no-unsafe-enum-assignment as a type-aware rule backed by oxlint-tsgolint 7.0.2005, following oxc-project/tsgolint#1316. Add rule documentation and regenerate the rule registry, JSON schema, and TypeScript config types.

Extend the existing type-aware CLI fixture with unsafe assignments, arguments, returns, assertions, mutations, and enum-key access, plus valid enum-member and bitwise-combination cases. Reuse the existing tests and update their diagnostic and count snapshots.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T01:18:25.889934Z 2c00bc5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details A-cli Area - oxlint / oxfmt common CLI behavior: flags, ignore files, oxc_config labels Oct 23, 2026
@camc314 camc314 changed the title feat(linter): support no-unsafe-enum-assignment feat(linter/typescript): implement no-unsafe-enum-assignment rule Oct 23, 2026
@camc314 camc314 self-assigned this Oct 23, 2026
@codspeed

codspeed Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 91 skipped benchmarks1


Comparing codex/no-unsafe-enum-assignment (2c00bc5) with main (8d6923b)2

Open in CodSpeed

Footnotes

  1. 91 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on codex/await-thenable-mixed-promise-arrays (165c91f) during the generation of this report, so main (8d6923b) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

Base automatically changed from codex/await-thenable-mixed-promise-arrays to main October 23, 2026 01:27
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 23, 2026

camc314 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

…8117)

Register `typescript/no-unsafe-enum-assignment` as a type-aware rule backed by oxlint-tsgolint 7.0.2005, following oxc-project/tsgolint#1316. Add rule documentation and regenerate the rule registry, JSON schema, and TypeScript config types.

Extend the existing type-aware CLI fixture with unsafe assignments, arguments, returns, assertions, mutations, and enum-key access, plus valid enum-member and bitwise-combination cases. Reuse the existing tests and update their diagnostic and count snapshots.
@graphite-app
graphite-app Bot force-pushed the codex/no-unsafe-enum-assignment branch from 2c00bc5 to d1b00f4 Compare October 23, 2026 01:29
@graphite-app
graphite-app Bot merged commit d1b00f4 into main Oct 23, 2026
34 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Oct 23, 2026
@graphite-app
graphite-app Bot deleted the codex/no-unsafe-enum-assignment branch October 23, 2026 01:33
Dunqing added a commit that referenced this pull request Oct 27, 2026
# Oxlint
### 🚀 Features

- cf34678 oxlint: Export `Oxlintrc` type (#28132) (Sysix)
- 831cdf1 oxlint: Require mininum oxlint-tsgolint version v7.0.2005
(#28118) (camc314)
- d1b00f4 linter/typescript: Implement no-unsafe-enum-assignment rule
(#28117) (camc314)
- 165c91f linter/typescript/await-thenable: Support
`allowMixedPromiseArrays` option (#28116) (camc314)

### 🐛 Bug Fixes

- 7f3c908 linter/eslint/array-callback-return: Check callbacks passed
with extra arguments (#28133) (sarankumar)
- 53be530 linter: Filter by type aware rules when looking up tsgolint
rule severity (#28138) (NavpreetSSidhu)
- e0f8937 react-compiler: Compile a `try` whose `catch` is unreachable
instead of panicking (#28066) (Dunqing)
- f5b625f linter/eslint/no-useless-concat: See through parenthesized
expressions (#27984) (Rahul Kashyap)
- 4629bb2 linter/jest/no-conditional-expect: Check function expression
callbacks (#28055) (camc314)
- 5c84098 semantic,linter: Report names with lone surrogates in enum and
lint checks (#27991) (Dunqing)
- f3705a9 linter/eslint/prefer-const: Skip fixers if any declarator is
reassigned (#28008) (Prince Jain)
- 4c0fa90 minifier,linter: Keep `delete` of constant members and later
JSX keys (#27990) (Dunqing)
- 0298062 linter/arrow-body-style: Keep type assertions when adding a
block body (#27978) (Yan Almeida)
# Oxfmt
### 🐛 Bug Fixes

- 5042019 formatter: Keep fill layout for array with comment after [
(#28170) (leaysgur)
- 9d37ff6 formatter: Use position-based comment checks for concise
arrays (#28169) (leaysgur)
- 016c4a2 formatter: Keep a comment before `}` inside a JSX spread child
(#28103) (vidigoat)
- 190bb1e formatter: Keep parens around an instantiation expression
ending an operand through any tight parent (#28168) (leaysgur)
- a5314a1 formatter: Keep `;` before `in` and `instanceof` class members
(#28166) (leaysgur)
- 3a56e7c formatter: Keep closing HTML comments at the start of a line
(#28064) (Cameron)
- 23d23d6 formatter_markdown: Honor range ignore inside directives
(#28164) (leaysgur)
- 5f1fd3d formatter: Measure width heuristics by display width (#28098)
(leaysgur)
- a5a52cf formatter: Keep parens around private `in` expressions
(#28096) (leaysgur)
- 999496e formatter: Measure a short key by its display width (#28026)
(vidigoat)
- 7e9aa44 formatter: Keep parens around a looser operand of an
instantiation expression (#28025) (vidigoat)
- 6912d1f formatter: Keep an arrow signature that exactly fills the line
for any body (#27989) (leaysgur)
- eb1d9f9 formatter_core: Count a flat `line` space in `fits` only when
text follows (#27987) (leaysgur)

### ⚡ Performance

- 1ed93af data_structures: Copy short strings without a memcpy call
(#27953) (leaysgur)
- 7948f0b formatter_core: Shrink `FormatElement` to 16B (#28012)
(leaysgur)
- 788af22 formatter: Keep `AstNode`s on the stack, and only chain links
in the arena (#27963) (leaysgur)

### 📚 Documentation

- 068a8ea formatter: Fix up wording (#28167) (leaysgur)
- db55461 formatter_core: Document text width divergence (#28095)
(leaysgur)
- 880d229 formatter: Add vitest-test-call to known divergences (#28006)
(leaysgur)

Co-authored-by: Dunqing <29533304+Dunqing@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - oxlint / oxfmt common CLI behavior: flags, ignore files, oxc_config A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants