Comments (11)
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.
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.
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.
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.
@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.
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.
@benmccann Did you try this one?
from eslint-plugin-i.
That's exactly what we were just talking about in the last comment
from eslint-plugin-i.
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.
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.
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)
- [feature] Allow for custom messaging or remove NPM specific messaging
- the "plugins" field in presets need to be an object HOT 1
- Port `ignoreUnusedTypeExports` option of `no-unused-modules` HOT 5
- Publish type definitions HOT 2
- CI failed and v0.5.1 was not published HOT 6
- import-x/namespace rule not detecting "toBuffer" in bwip-js HOT 1
- [Bug?] no-unused-modules (and deprecation) HOT 12
- ``import-x/no-extraneous-dependencies`` settings not applying to custom files HOT 3
- `Unable to resolve path to module` on `bun` or modules with `bun:` prefix HOT 5
- feature: `prefer-node-protocol` HOT 6
- [import-x/no-duplicates] performance is bad HOT 3
- [Perf] `import-x/no-cycle` has a very poor performance HOT 1
- [3.0.1] Huge performance regression in import/no-cycle HOT 11
- Upstream issue with incorrect `order` rule HOT 1
- `no-rename-default` HOT 2
- import-x/no-unresolved HOT 2
- Support typescript-eslint@8 HOT 6
- "no-named-as-default" should be changed to lessen false positives from 3rd party modules HOT 1
- Can't install with eslint 9.x HOT 1
- Typescript: Unable to resolve path for absolute pathes 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-i.