Open aayani opened 4 years ago
Yea TS v4 was released <24 hours ago...
TSDX does not do it's own parsing and ESLint itself does not seem to fully support it yet.
Well that makes sense. Let's just hope they fix it soon enough.
@aayani I mean I think it's a bit unreasonable to expect super fast turnarounds for an entire ecosystem. Having to wait a month or more should be totally normal, much of the folks in open source, including me, are volunteers -- expecting volunteers to drop everything for every breakage in a dependency is asking for a lot.
It's also not always possible, e.g. I could not update TSDX to Rollup v2 as several common plugins weren't compatible (including ones I built integration tests for). TS private fields support (TS 3.8) is also lagging behind in various places (Rollup, ESLint) due to AST changes
So we actually can't upgrade typescript-eslint
because TSDX doesn't require the plugin and parser directly, it does so indirectly as a peerDep of eslint-config-react-app
, which has yet to upgrade per https://github.com/formium/tsdx/pull/890#issuecomment-700292943 . Its @next
pre-release line has upgraded, but no one can tell how stable that will be 😕
I solved it adding
"resolutions": {
"**/@typescript-eslint/eslint-plugin": "^4.1.1",
"**/@typescript-eslint/parser": "^4.1.1"
}
on my package.json file
Current Behavior
The
yarn lint
ortsdx lint src test
is not behaving as expected after I upgraded TypeScript from v3 to v4. Getting the errorParsing error: Cannot read property 'map' of undefined
(in some files) in my case when I run these scripts. This make the pre-commit checks fail, hence rendering the husky hook useless.Expected behavior
The
yarn lint
script should work with TypeScript v4 as it was with v3.Suggested solution(s)
Additional context
Works fine when I revert to TypeScript 3. Problem only lies with the new version.
Your environment