3.1.0 β€’ Published 11 months ago

@putout/plugin-simplify-assignment v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@putout/plugin-simplify-assignment NPM version

🐊Putout plugin adds ability to simplify 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