2.0.1 β’ Published 11 months ago
@putout/plugin-add-missing-parens v2.0.1
@putout/plugin-add-missing-parens 
The JavaScript exception "tagged template cannot be used with optional chain" occurs when the tag expression of a tagged template literal is an optional chain, or if there's an optional chain between the tag and the template.
(c) MDN
πPutout plugin adds ability to add missing parens. Check out in πPutout Editor. Merged to @putout/plugin-parens.
Install
npm i @putout/plugin-add-missing-parensRule
{
"rules": {
"add-missing-parens": "on"
}
}β Example of incorrect code
getConsoleLog?.()``;
String?.raw``;
String?.raw!``;
await asyncFn()?.filter((x) => x);β Example of correct code
(getConsoleLog?.())``;
(String?.raw)``;
String?.raw!``;
(await asyncFn())?.filter((x) => x);License
MIT