-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[@typescript-eslint/no-base-to-string] is complaining about boolean values #1655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you provide more information? A small, self contained repro would be better. |
I can provide a live example: please check this PR ( The rule is complaining at |
Saw the same - I would expect the |
This is a bug. Self-contained repro is The rule grabs the For some reason, boolean types return For comparison, for both It seems like this bug is caused by a bug in typescript itself.. |
Maybe we should open an issue at the TS repo with a combined list of types with missing |
feel free if you'd like! We can't rely on a forward fix for this plugin, as that adds a ~3month turnaround on the fix, and forces people to upgrade their TS version (with breaking changes), so the rule will have to be fixed to workaround regardless. |
I'd rather have a fix sooner than later too :) Also noticed with |
note that
I tested |
Are you opening an issue because the rule you're trying to use is not found?
No
Repro
Rule definition in YAML
@typescript-eslint/no-base-to-string": error
Blamed TypeScript code fragment:
Expected Result
No output
Actual Result
152:51 error 'result will evaluate to '[Object object]' when stringified @typescript-eslint/no-base-to-string
Additional Info
Versions
@typescript-eslint/eslint-plugin
2.21.1-alpha.5
@typescript-eslint/parser
2.21.1-alpha.5
TypeScript
3.8.3
ESLint
7.0.0-alpha.2
node
13.9.0
npm
6.14.1
The text was updated successfully, but these errors were encountered: