Giter Site home page Giter Site logo

Comments (8)

mbonaci avatar mbonaci commented on July 18, 2024 2

FYI just to report that I managed to do a rewrite in which the existing import resolution aliases (webpack, jsconfig, tsconfig...) are taken into account.
I decided to publish a new package, given the unresponsiveness here, although I have to thank the original authors for the inspiration.

Introducing eslint-plugin-esm-import plugin: https://github.com/sematext/eslint-plugin-esm-import

from eslint-plugin-require-extensions.

0x80 avatar 0x80 commented on July 18, 2024 1

I was so happy when I found this, for converting a large existing repo, but then I realized that most of my paths use aliases 😞

from eslint-plugin-require-extensions.

jordaaash avatar jordaaash commented on July 18, 2024 1

@mbonaci Sorry about that! I had some of my Github emails going to an old work email address for quite a while, so I didn't see the notifications here until yours this week. I'd be happy to accept a PR to fix this behavior, and I'll check out your new package as well. If there's an opportunity for us to consolidate I'm very open to it, as we haven't been updating this in some time.

from eslint-plugin-require-extensions.

jordaaash avatar jordaaash commented on July 18, 2024

Happy to accept a PR to fix this!

from eslint-plugin-require-extensions.

0x80 avatar 0x80 commented on July 18, 2024

I don't think it's an easy fix. I tried hacking my way around it, but it didn't work, and I ran out of time. I'm going to park this for now.

from eslint-plugin-require-extensions.

Val-istar-Guo avatar Val-istar-Guo commented on July 18, 2024

same issue, hope someone have a good idea.

from eslint-plugin-require-extensions.

mbonaci avatar mbonaci commented on July 18, 2024

@jordaaash Would you accept a PR which adds an ability to specify alias mapping for your two rules?
Similar to these two: eslint-import-resolver-custom-alias and eslint-import-resolver-alias.

Ideally, it would take the list of aliases from any of these:

  • package.json browser field
  • webpack conf resolve.alias field
  • tsconfig.json paths
    but that would be much more complicated to implement.

from eslint-plugin-require-extensions.

mbonaci avatar mbonaci commented on July 18, 2024

@jordaaash No worries.

If there's an opportunity for us to consolidate...

I'd be open to that.
You can ping me here when you check it out.

from eslint-plugin-require-extensions.

Related Issues (10)

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.