-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
const arg = 123;
const arg2 = true;
const arg3 = null;
const msg1 = `arg = ${arg}-${arg2}-${arg3}`;
const msg2 = `arg = ${arg || 'zero'}`;
ESLint Config
{
"rules": {
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowNumber": true
}
]
}
}
tsconfig
Expected Result
Line 4, where I use null
and boolean
in the expression should show an error.
const msg1 = `arg = ${arg}-${arg2}-${arg3}`;
Actual Result
Line 4, where I use null
and boolean
show no error.
const msg1 = `arg = ${arg}-${arg2}-${arg3}`;
Additional Info
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look