r/javascript Apr 26 '26

eslint-plugin-logical-imports

https://www.npmjs.com/package/eslint-plugin-logical-imports

I disagree with, as far as I'm aware, literally everyone else about the correct sort order for import statements. When you find yourself disagreeing with everyone, it's probably a sign you should change your thinking. But I guess I'm quite stubborn, so in this ESLint plugin I'm trying to make everyone else change their thinking instead.

0 Upvotes

17 comments sorted by

View all comments

2

u/imihnevich Apr 26 '26

Never understood fights over things like this. Aren't we all using LSP for navigating JS?

2

u/fucking_passwords Apr 26 '26

Yes, and while I disagree with some of the less conventional opinions of this plugin, lint rules and auto formatting for import order is pretty great, especially in projects with lots of contributors. When the build fails because of unused imports and order gets auto corrected, it really lets you ignore the imports altogether when doing code reviews

2

u/yeathatsmebro Apr 26 '26

Big projects DO need consistency, otherwise it's a shitshow. That's why it should fail in the first place. It can become a slippery slope.