Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/restrict-template-expressions": ["error"]
}
}
function log(value: RegExp) {
console.log(`${value}`);
}
Expected Result
Since RegExp
defines .toString()
, I would expect that there would be options to allow printing them similar to allowBoolean
.
Actual Result
No way to make this allowed without disabling the rule.
Additional Info
Context: hoping to enable this internally for #3278.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.28.5 |
@typescript-eslint/parser |
4.28.5 |
TypeScript |
4.3.5 |
ESLint |
7.27.0 |
node |
16.6.0 |