Skip to content

feat(ts): add restrictedTypes rule - #3184

Draft
lishaduck wants to merge 1 commit into
mainfrom
feat/restricted-types
Draft

feat(ts): add restrictedTypes rule#3184
lishaduck wants to merge 1 commit into
mainfrom
feat/restricted-types

Conversation

@lishaduck

Copy link
Copy Markdown
Member

PR Checklist

Overview

Adds the TypeScript restrictedTypes rule with source-aware restrictions using TypeOrValueSpecifier.

The rule resolves direct references in type positions through imports and re-exports, then matches their final declarations by file, package, or TypeScript library provenance. It supports named and qualified references, generic references, heritage clauses, import types, and typeof type queries while avoiding same-name false positives from unrelated declarations.

The rule intentionally does not propagate restrictions through local aliases or computed structural equivalence, and it does not inspect runtime expressions, primitive keywords, {}, or [].

Includes rule documentation, full semantic unit coverage, TypeScript CLI integration coverage, rule-data registration, and a release changeset.

❤️‍🔥

@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2e103c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@flint.fyi/ts Minor
@flint.fyi/astro Patch
@flint.fyi/rule-data Patch
@flint.fyi/svelte Patch
@flint.fyi/vue Patch

Not sure what this means? Click here to learn what changesets are.

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

@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for flint-fyi ready!

Name Link
🔨 Latest commit 2e103c0
🔍 Latest deploy log https://app.netlify.com/projects/flint-fyi/deploys/6a77f1be1797a9000868a43e
😎 Deploy Preview https://deploy-preview-3184--flint-fyi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

🚀 Feature: Implement restrictedTypes rule (TypeScript)

2 participants