-
-
Notifications
You must be signed in to change notification settings - Fork 339
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
linter: import sorting and grouping #2713
Comments
I'd say that reporting whether the imports are sorted or not is kind of useless, I wonder if this should be a codemod, or a linter rule with |
Yes, there should be a |
Is there an existing eslint plugin for this? I'll make a decision if I have more contexts. |
|
The import plugin has |
I think eslint-plugin-simple-import-sort just has good defaults. Oxc can have both configurable rule and with good default |
import/order is doable but too complex. Has too much of configuration, require support. I will continue research about porting of simple-import-sort Also
|
I'm wondering if we can do import grouping relying on workspace (reading package.json and glob matching) or tsconfig.json paths rather than just the import source. This should configure well, because I'd like to see the |
What is the problem with import source? |
import { useEffect } from 'react' // "react": "18.2.0"
import { cn } from '@repo/lib' // "@repo/lib": "workspace:*"
import { Button } from 'components' // "baseUrl": "src" By looking at the string after The question is whether linter is allowed to read any files in the workspace. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Need rule for lexicographical sorting and grouping of imports
Details
The text was updated successfully, but these errors were encountered: