@putout/plugin-add-missing-parens
🐊Putout plugin adds missing parens
Last updated a year ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

4 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |