Skip to content

[@typescript-eslint/no-base-to-string] is complaining about boolean values #1655

@juergenzimmermann

Description

@juergenzimmermann

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:

const result = compareSync(password, user.password); // result is of type boolean
logger.error(`AuthService.checkPassword(): ${result}`);

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

package version
@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexternalThis issue is with another package, not typescript-eslint itselfhas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions