eslint-plugin-import
eslint-plugin-import copied to clipboard
Release with new ESLint types?
Hiya, like many projects my project is upgrading to the new flat eslint config format. Unfortunately the eslint.config.js doesn't type check properly currently:
Module '"/home/darius/yomitan/node_modules/eslint-plugin-import/lib/index"' has no default export.ts(1192)
I believe the types added around two months ago here https://github.com/import-js/eslint-plugin-import/commit/9d1f639a3ff5acd2bd0a44dbac761f1b1f6d583b should solve this issue.
Is there any chance we could get a new release with that included? I think probably a lot of mixed javascript / typescript projects will face this issue.
Can you try importing with * as (e.g. import * as importPlugin from 'eslint-plugin-import')
That commit indeed isn't released yet. there's a number of open PRs i'm hoping to get into it, but I'll try to cut one in the next couple days.
@ljharb sorry for being "that guy", but I think there is a bunch of people who would appreciate a new version being released 🥺
Can you try importing with
* as(e.g.import * as importPlugin from 'eslint-plugin-import')
worked for me, although differs from official documentation
using
// even though default export works, ts doesn't like it
import * as importPlugin from 'eslint-plugin-import';
in my projects
The official documentation doesn't cover using the plugin in a typescript based config at all. Feel free to submit a pr.
Hello @ljharb, this package is amazing, I would like to thank you for maintaining it. The only thing slowing us is new versions not being released quickly. Would you be interested if I created a PR that would introduce automatic beta releases with each commit? That way early adopters could use the beta versions and the official latest releases would still be done manually. Thank you for considering this.
No thanks; released is released, and automatic releases of any kind aren’t something I’m interested in.
That's not a motivator; my time triaging issues, however, is.
Seems to be fixed in [email protected] 🎉
Related PR: https://github.com/import-js/eslint-plugin-import/pull/3097
Yep, v2.32.0 has been released.