@putout/plugin-add-missing-parens
🐊Putout plugin adds missing parens
Last updated 2 years 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. Merged to @putout/plugin-parens.

Install

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

Rule

{
    "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

Current Tags

  • 2.0.1                                ...           latest (2 years ago)

4 Versions

  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

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