@putout/plugin-simplify-assignment
assignment
.
Install
npm i @putout/plugin-simplify-assignment -D
Rule
{
"rules": {
"simplify-assignment": "on"
}
}
❌ Example of incorrect code
const {a} = {
a: 5,
};
const [b] = [5];
const c = (() => 7)();
✅ Example of correct code
const a = 5;
const b = 5;
const c = 7;
License
MIT