prettier-plugin-sort-imports
prettier-plugin-sort-imports copied to clipboard
Add importOrderCaseInsensitive option again
There's value in sorting uppercase first: constants, constructors and functions become sorted in that order.
Support for case sensitive sorting was dropped here #63
Leaving this open so that others can vote with 👍, and we'll consider it depending on the demand.
I'm curious why this was removed in the first place? I'm happy to make a PR if time is the issue.
It was removed because there were a ton of options previously, which goes against the philosophy of prettier. There more options there are, the more you have to think about decisions when setting it up, and the more complex the codebase becomes.
I not only want case-sensitivity, but also think that this should be the default. Here is a prime example of why I think this is the case:
import {
faAngleLeft,
faAngleRight,
faArrowDown,
faArrowLeft,
faArrowRight,
faArrowsV,
faArrowUp,
faSearch,
faSmile,
faTvRetro,
} from '@fortawesome/pro-regular-svg-icons';
@ianvs/prettier-plugin-sort-imports
sorts the faArrowsV
before the faArrowsUp
, which I think is very strange when you look at it. It makes much more sense for the "arrow" icon to be sorted with the other "arrow" (singular) icons, and then for the "arrows" icon to come after (or before), the point is that case-insensitivity to me seems like a very strange default.