Rule: strict-string-expressions
Disable implicit toString() calls
Require explicit toString() call for variables used in strings. By default only strings are allowed.
The following nodes are checked:
- String literals (“foo” + bar)
- ES6 templates (
foo ${bar}
)
Notes:
Config
Following arguments may be optionally provided:
allow-empty-types
allowsnull
,undefined
andnever
to be passed into strings without explicit conversion
Config examples
"strict-string-expressions": true
"strict-string-expressions": [true, {"allow-empty-types": true}]
Schema
{ "properties": { "allow-empty-types": { "type": "boolean" } }, "type": "object" }