prettier-plugin-sort-imports icon indicating copy to clipboard operation
prettier-plugin-sort-imports copied to clipboard

Add importOrderCaseInsensitive option again

Open angrybacon opened this issue 1 year ago • 4 comments

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

angrybacon avatar Feb 23 '24 21:02 angrybacon

Leaving this open so that others can vote with 👍, and we'll consider it depending on the demand.

IanVS avatar Jun 25 '24 15:06 IanVS

I'm curious why this was removed in the first place? I'm happy to make a PR if time is the issue.

jar145 avatar Jun 29 '24 15:06 jar145

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.

IanVS avatar Jun 30 '24 02:06 IanVS

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.

acnebs avatar Sep 09 '24 08:09 acnebs