-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulegood first issueGood for newcomersGood for newcomershas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/no-base-to-string": "error"
}
}
declare function tag(xs: TemplateStringsArray, ...ys: unknown[]): void;
tag`${{}}`;
Expected Result
No lint errors because the tag does not necessarily stringify the interpolated values.
Actual Result
Lint error is reported.
2:7 error '{} will evaluate to '[Object object]' when stringified @typescript-eslint/no-base-to-string
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.24.0 and 2.24.1-alpha.0 |
@typescript-eslint/parser |
2.24.0 and 2.24.1-alpha.0 |
TypeScript |
3.7.5 |
ESLint |
6.8.0 |
node |
12.14.1 |
npm |
6.13.4 |
stekycz and sindresorhus
Metadata
Metadata
Assignees
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulegood first issueGood for newcomersGood for newcomershas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin