Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@putout/plugin-simplify-assignment

coderaiser20.5kMIT3.1.1

🐊Putout plugin adds ability to simplify assignment

putout, putout-plugin, plugin, assignment, simplify

readme

@putout/plugin-simplify-assignment NPM version

🐊Putout plugin adds ability to simplify assignment. Merged with @putout/plugin-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