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.
$ npm install --save-dev eslint-plugin-import-order-alphabeticalor$ yarn add --dev eslint-plugin-import-order-alphabetical
Then in your
plugins: "eslint-plugin-import-order-alphabetical"rules:"import-order-alphabetical/order": "error"
For more detailed options, see eslint-plugin-import/order.
❤️ Thank you to the people working on eslint-plugin-import and related projects. It's not easy to maintain open source and I really do appreciate the work that goes into it. ❤️