eslint-plugin-import-order-alphabetical
eslint-plugin-import/order, but with alphabetical sorting. Based on this PR. Because this one seems to be going nowhere and doesn't even have autofixing.
Note: the autofixing doesn't always work. But it's better than nothing! :)
PRs very welcome. And even better if we could get this back into eslint-plugin-import, of course.
Usage
$ npm install --save-dev eslint-plugin-import-order-alphabetical
or
$ yarn add --dev eslint-plugin-import-order-alphabetical
Then in your .eslintrc.js
:
plugins: ["eslint-plugin-import-order-alphabetical"],
rules: {
"import-order-alphabetical/order": "error",
},
For more detailed options, see eslint-plugin-import/order.