Closed idleberg closed 1 month ago
My suspicion is that you're using TypeScript - if so, what version of TS and the TS eslint import resolver are you using?
We're on an older ESLint version, but I think we caught the same problem in the (also out-of-date) ESLint 8 version.
{
"devDependencies": {
"eslint": "7.32.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"typescript": "^5.5.4"
}
}
eslint 8 is the latest version that everything supports, still, so i'd def suggest updating - but the rest are good.
what's your eslint config look like?
I tested again with ESLint 8.57.1, we got the same issue
I also conducted a superficial test with ESLint 9 and did not observe the problem. However, I don't have much experience with the ESLint configuration migrator and how good its results are.
Were you able to resolve the issue?
Were you able to resolve the issue?
I guess this is up for debate. I did not manage to resolve the issue using ESLint 8.x, so we took this as an opportunity to finally upgrade to 9.x. One thing puzzles me though: you mentioned this plugin supports ESLint >=8, but this isn't reflected by the version range specified in peerDependencies
– how come?
I'm having problems using
import/no-duplicates
in a Svelte application (not that it is important) that contains the following imports:When running ESLint with the
--fix
flag, the code will be converted into the following code:And this, of course, will break the application from resolving the module:
In addition, this issue doesn't show up in normal lint mode (without
--fix
), which made it hard to identify the rule causing the issue.