Eslint-plugin-import: Allow import/order to accept a glob/regex

Created on 23 Nov 2016  路  5Comments  路  Source: benmosher/eslint-plugin-import

Why

It should be possible to sort the imports based on their needs.

For example:
I want to have my meteor imports after my node imports but before the rest.

Proposal

.eslintrc.js

module.exports = {
  rules: {
    'import/order': ['error', {
      groups: [
        'builtin',
        '^meteor/.+$'
      ]
    }]
  }
}

Thoughts?

imporexport ordering

Most helpful comment

+1! Need it to put css imports into a separate group.

All 5 comments

+1! Need it to put css imports into a separate group.

Any updates on this feature?

Would really love to have this as well. Seems like it's a recurring request.

Any update on this proposal? I would love to see this 馃憤

same +1

Was this page helpful?
0 / 5 - 0 ratings