@putout/plugin-convert-expression-to-params

1.0.3 • Public • Published

@putout/plugin-convert-expression-to-params NPM version

Uncaught SyntaxError: Malformed arrow function parameter list occurs when your function declaration is missing valid parameters.

(c) MDN

🐊Putout plugin adds ability to fix SyntaxError: missing formal parameter . Checkout in 🐊Putout Editor.

Install

npm i @putout/plugin-convert-expression-to-params -D

Rule

{
    "rules": {
        "convert-expression-to-params": "on"
    }
}

❌ Example of incorrect code

(__a, __b) => __b + __a;
(__a, __b) => __b + __a;
(__a, hello, world) => __a;

✅ Example of correct code

(__a, hello, world) => __a;
(__a, __b) => __b + __a;
(__a, __b) => __b + __a;

License

MIT

Package Sidebar

Install

npm i @putout/plugin-convert-expression-to-params

Weekly Downloads

1,577

Version

1.0.3

License

MIT

Unpacked Size

4.39 kB

Total Files

4

Last publish

Collaborators

  • coderaiser