@putout/plugin-simplify-assignment
Version:
πPutout plugin adds ability to simplify assignment
47 lines (33 loc) β’ 820 B
Markdown
# @putout/plugin-simplify-assignment [![NPM version][NPMIMGURL]][NPMURL]
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-simplify-assignment.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-simplify-assignment "npm"
π[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to simplify `assignment`.
Merged with [`@putout/plugin-assignment`](https://www.npmjs.com/package/@putout/plugin-assignment).
## Install
```
npm i @putout/plugin-simplify-assignment -D
```
## Rule
```json
{
"rules": {
"simplify-assignment": "on"
}
}
```
## β Example of incorrect code
```js
const {a} = {
a: 5,
};
const [b] = [5];
const c = (() => 7)();
```
## β
Example of correct code
```js
const a = 5;
const b = 5;
const c = 7;
```
## License
MIT