@putout/plugin-split-assignment-expressions
🐊Putout plugin adds ability to find and remove process.exit
Last updated 2 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-split-assignment-expressions 
SYNC missed versions from official npm registry.

@putout/plugin-split-assignment-expressions NPM version

The assignment (=) operator is used to assign a value to a variable or property. The assignment expression itself has a value, which is the assigned value. This allows multiple assignments to be chained in order to assign a single value to multiple variables.

(c) MDN

????Putout plugin adds ability to find and split variable declarations because (re)moving a line is simpler and less error prone then changing coma (=) to colon (;).

For the same reason, diff of changed declarations are more comfortable to read. Checkout in ????Putout Editor.

Install

npm i @putout/plugin-split-assignment-expressions

Rule

{
    "rules": {
        "split-assignment-expressions": "on"
    }
}

❌ Example of incorrect code

a = b = c = 1;

✅ Example of correct code

a = 1;
b = a;
c = a;

License

MIT

Current Tags

  • 2.1.0                                ...           latest (a year ago)

5 Versions

  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.0                                ...           2 years 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 |