-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: Added Import Order to Prettier Config #11
base: main
Are you sure you want to change the base?
Conversation
I think it moves third party stuff to the top and leaves the rest?
|
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.
Do you think we should have a default import order? We have one already in the eslint file, I think maybe the default should match eslint?
Are you hating the import order thing? I'm finding it kinda weird personally. When I include @alias
imports in my code it treats them as third party, which is annoying
Can you add a bit to the readme about how this thing should be used?
"devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "^4.2.0" |
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 think this should be a peer dependency?
importOrder: [], // Override this for your repo. https://github.com/trivago/prettier-plugin-sort-imports | ||
importOrderSeparation: true, | ||
importOrderSortSpecifiers: true, | ||
plugins: ["@trivago/prettier-plugin-sort-imports"], |
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.
Can you add a little to the readme about how to override the import order?
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.
@anna-murphy - Wanted to bump this!
FWIW we use eslint to enforce the import order in XMA portal? |
Added import order prettier plugin ( https://github.com/trivago/prettier-plugin-sort-imports ). I think this should do nothing unless you override the default order in your prettier config a la the README.
Thoughts?