@putout/plugin-add-missing-parens
🐊Putout plugin adds missing parens
Last updated 23 days ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-add-missing-parens 
SYNC missed versions from official npm registry.

@putout/plugin-add-missing-parens NPM version

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.

Install

npm i @putout/plugin-add-missing-parens

Rule

{
    "rules": {
        "add-missing-parens": "on"
    }
}

❌ Example of incorrect code

getConsoleLog?.()``;
String?.raw``;
String?.raw!``;

✅ Example of correct code

(getConsoleLog?.())``;
(String?.raw)``;
String?.raw!``;

License

MIT

Current Tags

  • 1.0.1                                ...           latest (23 days ago)

2 Versions

  • 1.0.1                                ...           23 days ago
  • 1.0.0                                ...           23 days ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE