Closed luisnaranjo733 closed 5 years ago
It sounds like you're running ESLint on your node_modules/
directory, which I'd strongly encourage you to not do! node_modules
are ignored by default - are you linting them for a specific purpose?
Sorry - realizing I misunderstood. I thought this was being run in a linting step. It sounds like it might be pulling in a sub-dependency typescript
module. Any chance you can check to see if that's the case?
Yeah, you're right. I just noticed that my yarn.lock has two top level entries for TS, and that detective-typescript references 3.0.3. So that is getting used instead of the version I'm declaring. Is this considered a bug in detective-typescript?
typescript@^3.0.1:
version "3.0.1"
typescript@^3.0.3:
version "3.1.3"
detective-typescript@^4.0.0:
version "4.1.1"
dependencies:
node-source-walk "^4.0.0"
typescript "^3.0.3"
typescript-eslint-parser "^18.0.0"
detective-typescript
might be able to mitigate these errors by matching the version of TS specified exactly (i.e. ~3.0.1
should fix this, I believe), but that would most likely require changing the version of typescript-eslint-parser
so that it doesn't update semver-minor versions automatically either. It's tricky with a project like this because changes in parsers are almost always breaking changes.
That being said, now that the bulk of parsing is being done in typescript-estree, I imagine most non-ESLint dependencies would want to use that package directly.
I think this issue was resolved, but feel free to open a new issue on the new project https://github.com/typescript-eslint/typescript-eslint at any time
Thanks!
I'm using this module through madge, which uses the "dependency-tree" package, which uses the "precinct" package, which uses the "detective-typescript" package, which actually has "typescript-eslint-parser" as a dependency.
I am seeing the following warning, which I suspect is incorrect
My project's devDependencies in package.json looks like this
"typescript": "^3.0.1",
and if I go to node_modules/typescript/package.json, I can see"version": "3.0.1"
. So basically I'm pretty sure that I'm on 3.0.1, but typescript-eslint-parser is warning me that I'm on the wrong version.Any idea why this might be happening?