Skip to content

Enable typescript/no-unnecessary-type-assertion oxlint rule#510

Merged
stipsan merged 3 commits intomainfrom
copilot/enable-no-unnecessary-type-assertion
Feb 3, 2026
Merged

Enable typescript/no-unnecessary-type-assertion oxlint rule#510
stipsan merged 3 commits intomainfrom
copilot/enable-no-unnecessary-type-assertion

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

Enables the typescript/no-unnecessary-type-assertion rule to prevent redundant type assertions that don't change the expression type.

Changes

  • Added typescript/no-unnecessary-type-assertion: error to .oxlintrc.json

No violations found in the current codebase. The rule will now catch issues like:

const x: number = 5
const y = x as number  // ❌ Error: unnecessary assertion

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • sanity-cdn.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/plugins/plugins/dev/test-studio/node_modules/.bin/../sanity/bin/sanity build git k/pl�� --git-common-dir (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Enable the typescript/no-unnecessary-type-assertion oxlint rule</issue_title>
<issue_description>https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-unnecessary-type-assertion
and fix all violations</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

⚠️ No Changeset found

Latest commit: f5db85c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment Feb 3, 2026 10:31am

Request Review

Copilot AI changed the title [WIP] Enable typescript/no-unnecessary-type-assertion oxlint rule Enable typescript/no-unnecessary-type-assertion oxlint rule Feb 3, 2026
Copilot AI requested a review from stipsan February 3, 2026 10:14
Copilot AI and others added 3 commits February 3, 2026 11:30
Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
Co-authored-by: stipsan <81981+stipsan@users.noreply.github.com>
@stipsan stipsan force-pushed the copilot/enable-no-unnecessary-type-assertion branch from 4c80e5e to f5db85c Compare February 3, 2026 10:31
@stipsan stipsan marked this pull request as ready for review February 3, 2026 10:31
Copilot AI review requested due to automatic review settings February 3, 2026 10:31
@stipsan stipsan enabled auto-merge (squash) February 3, 2026 10:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables the typescript/no-unnecessary-type-assertion oxlint rule to catch redundant type assertions that don't actually change the expression type, helping maintain cleaner TypeScript code.

Changes:

  • Added the typescript/no-unnecessary-type-assertion rule configuration to the oxlint configuration file
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stipsan stipsan disabled auto-merge February 3, 2026 10:31
@stipsan stipsan merged commit a9cf15b into main Feb 3, 2026
8 checks passed
@stipsan stipsan deleted the copilot/enable-no-unnecessary-type-assertion branch February 3, 2026 10:32
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.

Enable the typescript/no-unnecessary-type-assertion oxlint rule

2 participants