Git Product home page Git Product logo

Comments (11)

ljharb avatar ljharb commented on August 15, 2024 3

That's definitely not accurate - there's a ton of things it does that TS can't - but it's unfortunate that's been your experience.

from eslint-plugin-i.

JounQin avatar JounQin commented on August 15, 2024 1

If you're using TypeScript, you can use eslint-import-resolver-typescript, for plain js, it doesn't support it for now, but I think your suggestion is valuable, I'll try to add this feature this weekend.

from eslint-plugin-i.

benmccann avatar benmccann commented on August 15, 2024 1

I personally have just stopped using eslint-plugin-imports altogether as it provides no value that isn't already provided by Typescript. Unfortunately many others still use it and then end up bugging me that my libraries are not working with their outdated plugin. Unfortunately, I can't ask everyone to use one of the resolver plugins because they're far too cumbersome to setup. C'est la vie!

from eslint-plugin-i.

JounQin avatar JounQin commented on August 15, 2024 1

eslint-import-resolver-typescript works without typescript itself, that's why we're using get-tsconfig instead of relying on typescript because it's heavily for non typings.

from eslint-plugin-i.

JounQin avatar JounQin commented on August 15, 2024

@benmccann Another thought, did you just try eslint-import-resolver-exports? So that less change could be made in this fork.

from eslint-plugin-i.

benmccann avatar benmccann commented on August 15, 2024

It's rather complicated to setup. It requires another package as well, so you have to setup at least three libraries for something that seems like it should really just work out of the box.

I understand wanting to keep the diff to upstream small as well though. I do think it would affect adoption a lot though to use eslint-import-resolver-exports. It would be really nice if the migration instructions were simply to switch eslint-plugin-import to eslint-plugin-i vs something more complicated.

from eslint-plugin-i.

Anatolych97 avatar Anatolych97 commented on August 15, 2024

@benmccann Did you try this one?

resolvers

from eslint-plugin-i.

benmccann avatar benmccann commented on August 15, 2024

That's exactly what we were just talking about in the last comment

from eslint-plugin-i.

13OnTheCode avatar 13OnTheCode commented on August 15, 2024

By the way, the latest version of VSCode currently does not support exports, so you still cannot completely get rid of the main field. I also want to fully embrace ESM, but unfortunately, we were born in the worst era for it.

from eslint-plugin-i.

silverwind avatar silverwind commented on August 15, 2024

By the way, the latest version of VSCode currently does not support exports, so you still cannot completely get rid of the main field

You can get rid of main when a index.js is present which satisfies the linter. Not ideal but works.

from eslint-plugin-i.

JounQin avatar JounQin commented on August 15, 2024

I think this is outscoped, you should use eslint-import-resolver-exports or eslint-import-resolver-typescript instead.

from eslint-plugin-i.

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.