You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After ESLintPlugin has been running for a while, with a bunch of files changed, I will start to get errors like
'any' overrides all other types in this union type @typescript-eslint/no-redundant-type-constituents
The union type in question is like foo.A | null | undefined, where foo.A comes from a foo.d.ts file. This file is sometimes regenerated (protobuf.js-generated types). Once the type info is somehow lost, the loss tends to persist. This does not happen with all types in foo.d.ts, nor does it happen with all types in the edited file -- some random type(s) gets lost.
Expected Behavior
Editing files should not cause type errors to appear that were not there on load.
How Do We Reproduce?
Unfortunately I don't have a great repro here. It happens "after a while". This reads as identical to the issue mentioned in the typescript-eslint docs here about VSCode, which I'm guessing uses a somewhat different stack:
This is an Angular application (currently Angular 18.1, but this issue has been ongoing for some time now), with a custom builder (@angular-builders/custom-webpack:dev-server), and a webpack config which adds the ESLintPlugin in serve mode:
Bug report
After ESLintPlugin has been running for a while, with a bunch of files changed, I will start to get errors like
'any' overrides all other types in this union type @typescript-eslint/no-redundant-type-constituents
The union type in question is like
foo.A | null | undefined
, wherefoo.A
comes from afoo.d.ts
file. This file is sometimes regenerated (protobuf.js-generated types). Once the type info is somehow lost, the loss tends to persist. This does not happen with all types infoo.d.ts
, nor does it happen with all types in the edited file -- some random type(s) gets lost.Expected Behavior
Editing files should not cause type errors to appear that were not there on load.
How Do We Reproduce?
Unfortunately I don't have a great repro here. It happens "after a while". This reads as identical to the issue mentioned in the typescript-eslint docs here about VSCode, which I'm guessing uses a somewhat different stack:
https://typescript-eslint.io/troubleshooting/typed-linting#editor-eslint-reports-become-out-of-date-after-file-changes
This is an Angular application (currently Angular 18.1, but this issue has been ongoing for some time now), with a custom builder (
@angular-builders/custom-webpack:dev-server
), and a webpack config which adds the ESLintPlugin in serve mode:These errors never happen on a regular build or lint run.
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: