-
Notifications
You must be signed in to change notification settings - Fork 18
feat(ts): implement restrictedImports rule #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lishaduck
left a comment
There was a problem hiding this 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.
|
+1 to what lishaduck said, sorry if this wasn't clear from the issue. |
PR Checklist
status: accepting prsOverview
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.