lydell / eslint-plugin-simple-import-sort

Easy autofixable import sorting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to prevent sorting inside a group

receter opened this issue · comments

Hi,

Thanks for creating and maintaining this plugin! I use it for a while now and I appreciate that it does group but not sort side effects.

I would wish that this behavior can also be enabled for other groups. I have a group with CSS module imports (["^.+\\.(module.css|module.scss)$"]) and for theses the order can make a difference. (I wrote about this here: https://dev.to/receter/avoiding-css-order-of-appearance-problems-with-css-modules-3j7p)

I imagine something like:

    "groups": [
      …
          [
            {
              regex: "^.+\\.(module.css|module.scss)$",
              options: { sort: false },
            },
          ],
      …
    ]

Let me know what you think and I can make a PR if you want me to.

Hi! Nice blog post! However, I’m not interested in extending the config of this plugin. If you end up forking, please let me know so I can link to your fork.