typescript-eslint: Upgrading from 2.22.0 to 2.23.0 causes parsing to fail miserably
I’m not sure what’s going on, but when I upgrade to the latest version of the typescript-eslint packages (including 2.24.0), linting fails on my entire codebase at a very low level. With version 2.22.0 or earlier, everything is fine. The errors all look like this:
Parse errors in imported module './Foo': Unexpected token = (49:21)
What happened?
Versions
| package | version |
|---|---|
@typescript-eslint/parser |
2.23.0 |
TypeScript |
3.8.3 |
ESLint |
6.8.0 |
node |
12.16.1 |
npm |
6.13.4 |
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (10 by maintainers)
After digging all day, I feel pretty confident that the root issue is that we have a mixed-language codebase, where our JS files also have (dormant) Flow types. That’s why we have both
@typescript-eslintandbabel-eslintin our codebase. I don’t like it, but that’s how it is.After some clean installs and clean package upgrades, I got the number of linting errors down to something very reasonable. All the errors were related to Flow rules being incorrectly applied to TS files. Once I updated our eslint config to not do that, everything passed. Sorry for the trouble and thanks a ton for your suggestions!