Comments (4)
Thanks for the kind words!
I would love a really good require
sorter too! However, I'm not interested in making one, because these days the majority of the code I write uses import
only, and as such I don't want to spend the time on dealing with all the complexity of require
.
If you make or find a good eslint-plugin-simple-require-sort
plugin – feel free to share it and I'll happily link to it!
I'm also kind of hoping that import
will start being a thing in Node.js code before a eslint-plugin-simple-require-sort
plugin comes into existence, so that sorting require
becomes less and less relevant :)
For now I'm sticking with import/order
which works OK-ish.
from eslint-plugin-simple-import-sort.
If you make or find a good
eslint-plugin-simple-require-sort
plugin – feel free to share it and I'll happily link to it!
Kind of hoping someone comes along and does just this!
I'm also kind of hoping that
import
will start being a thing in Node.js code before aeslint-plugin-simple-require-sort
plugin comes into existence, so that sortingrequire
becomes less and less relevant :)
Yea, I agree, we might get there relatively soon, at least in applications which only need to support a single Node version.
However in libraries there's a lot of diversity of opinion. Many libraries have a policy of targeting all the LTS versions of Node. For example, the latest release of Nock supports Node 6, and it's only in beta releases where Node 6 support has been dropped. Express takes a particularly (conservative? liberal?) approach: according to their package.json
they still supports 0.10.0! That might be a little extreme, but keep in mind that it's not an obscure package: express is a big project with a big ecosystem of dependencies, all of which are basically following that rule.
TLDR, I think require()
is going to be around for a while.
Of course I'm not trying to convince you to do work you don't want to do; just wanting to encourage someone who may be feeling this need more acutely, that this is worth taking on.
For now I'm sticking with
import/order
which works OK-ish.
👍
from eslint-plugin-simple-import-sort.
I think
require()
is going to be around for a while.
Yeah, me too. Forever, actually. But at some point (in a couple of years) hopefully all new packages will be written with import
.
from eslint-plugin-simple-import-sort.
Not asking for supporting require
but just want to say thank you for the plugin. I was dead from using a tool with jscodeshift until now. Keep doing your great work!
from eslint-plugin-simple-import-sort.
Related Issues (20)
- Grouping exports HOT 3
- `Error: Failed to load config "simple-import-sort" to extend from.` HOT 5
- Sorting by line length HOT 2
- conflict with prettier? HOT 5
- So how do you remove blank lines between groups? HOT 4
- How can I make imports with a capitalized first letter always come first? HOT 2
- Question: relative side-effect imports are placed before relative imports HOT 2
- Question: how to approach the workaround for padding-line-between-statements? HOT 2
- Please update your docs HOT 2
- Named imports with `as` aren't sure where to go HOT 2
- Using without new lines between groups HOT 2
- Error with aliased imports and eslint-plugin-import HOT 1
- Support for namespace imports HOT 8
- Prepare for ESLint 9: Deprecated methods
- sorted import specifiers missing space HOT 2
- how to make side effect always be top HOT 2
- I thought library imports were supposed to come before relative imports? HOT 4
- Error: Run autofix to sort these imports! HOT 7
- Duplicate imports are not being removed HOT 1
- Conflict between eslint-plugin-simple-import-sort and esbenp.prettier-vscode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-simple-import-sort.