@putout/plugin-merge-destructuring-properties
v10.0.0
Published
šPutout plugin adds ability to merge destructuring properties
Downloads
60,419
Maintainers
Readme
@putout/plugin-merge-destructuring-properties
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from
arrays
, orproperties
fromobjects
, into distinctvariables
.(c) MDN
šPutout plugin adds ability to merge destructuring properties.
Install
npm i @putout/plugin-merge-destructuring-properties
Rule
Rule merge-destructuring-properties
is enabled by default, to disable add to .putout.json
:
{
"rules": {
"merge-destructuring-properties": "off"
}
}
ā Example of incorrect code
const {one} = require('numbers');
const {two} = require('numbers');
ā Example of correct code
const {one, two} = require('numbers');
License
MIT