-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add importOrderCaseInsensitive
option
#69
Conversation
0752fbb
to
79aa2b6
Compare
HI @timiles , Thank you so much for the PR 🎉. We will include these changes in the new major release. |
@@ -25,7 +25,10 @@ export const getSortedNodes = ( | |||
nodes: ImportDeclaration[], | |||
order: PrettierOptions['importOrder'], | |||
importOrderSeparation: boolean, | |||
importOrderCaseInsensitive: boolean, |
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.
As this function receives four arguments now, it would be better to convert arguments to an object.
export const getSortedNodes = ({
nodes: ImportDeclaration[],
order: PrettierOptions['importOrder'],
importOrderSeparation: boolean,
importOrderCaseInsensitive: boolean}
) => {}
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 can make this change next chance I get, it would also help fix the failing tests too (sorry, I thought they all passed before I pushed!)
@timiles there are some failing tests. Just a minor change to fix. |
79aa2b6
to
c121c87
Compare
@ayusharma tests are fixed 👍 |
Case-insensitive option for ordering imports.
Example problem: with no import order specified, importing siblings "ThingsList" and "ThingView". I would like for them to listed in that order, as "s" comes before "V". But due to case sensitivity, upper case "V" actually comes before lower case "s", so we get:
This PR gives me the option to have: