Skip to content

Conversation

@kolharsam
Copy link
Contributor

PR Checklist

Overview

This pull request introduces a new TypeScript rule, restrictedImports, to the plugin. The rule allows users to specify modules or patterns that should not be imported, with flexible configuration options for restricting specific imports, allowing certain names, or exempting type-only imports. The change includes implementation, documentation, and comprehensive tests.

@changeset-bot
Copy link

changeset-bot bot commented Jan 30, 2026

⚠️ No Changeset found

Latest commit: c9bcab4

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 Jan 30, 2026

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

Project Deployment Actions Updated (UTC)
flint Ready Ready Preview, Comment Jan 31, 2026 7:39pm

Request Review

Copy link
Member

@lishaduck lishaduck left a comment

Choose a reason for hiding this comment

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

I didn't check the implementation, but from a quick skim through the docs this doesn't look like it uses the TypeOrValueSpecifier format Flint's standardized on.
I recognize that this rule has some specific needs I don't think TypeOrValue could cover, but it'd be nice to at least have a write up of why TypeOrValue didn't work here and where we deviate, and generally ensure that our naming maps 1:1 as much as possible.

@JoshuaKGoldberg JoshuaKGoldberg changed the title feat: implement restrictedImports rule feat(ts): implement restrictedImports rule Jan 31, 2026
@JoshuaKGoldberg
Copy link
Collaborator

+1 to what lishaduck said, sorry if this wasn't clear from the issue.

@JoshuaKGoldberg JoshuaKGoldberg added the status: waiting for author Needs an action taken by the original poster label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting for author Needs an action taken by the original poster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Implement restrictedImports rule (TypeScript)

3 participants