Giter Club home page Giter Club logo

Comments (4)

lydell avatar lydell commented on May 30, 2024 1

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.

paulmelnikow avatar paulmelnikow commented on May 30, 2024 1

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 a eslint-plugin-simple-require-sort plugin comes into existence, so that sorting require 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.

lydell avatar lydell commented on May 30, 2024

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.

namnm avatar namnm commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.