Comments (8)
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.
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.
@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.
Happy to accept a PR to fix this!
from eslint-plugin-require-extensions.
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.
same issue, hope someone have a good idea.
from eslint-plugin-require-extensions.
@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.
@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)
- False-negative on JSON import HOT 2
- .jsx support? HOT 1
- [Question] Why I need to set extends and plugins in config? HOT 1
- usage in eslint flat config HOT 3
- How to properly combine it with import/extensions rule in an ESM project? HOT 1
- Autofix broken for index file imports HOT 9
- Allow "parametrised" imports HOT 1
- `require-extension` rule does not apply to dynamic imports
- Quotes
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-require-extensions.