open-index/open-npm huggingface dataset:
npm package: @putout/plugin-convert-generic-to-shorthand
Description: putout plugin adds ability to convert generic to shorthand
Author: coderaiser
Latest version: 2.0.1

# @putout/plugin-convert-generic-to-shorthand [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-generic-to-shorthand.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-generic-to-shorthand "npm"

🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability to convert `generic` to `shorthand` (https://stackoverflow.com/a/36843084/4536327).
Moved to [`@putout/plugin-typescript`](https://github.com/coderaiser/putout/v24.0.2/master/packages/plugin-typescript#convert-generic-to-shorthand).

## Install

```
npm i @putout/plugin-convert-generic-to-shorthand -D
```

## Rule

Rule `convert-generic-to-shorthand` is enabled by default for `ts` and `tsx` files.

```json
{
    "rules": {
        "convert-generic-to-shorthand": "on"
    }
}
```

## ❌ Incorrect code example

```ts
interface A {
    x: Array<X>;
    y: Array<Y>;
}
```

## ✅ Correct code Example

```ts
interface A {
    x: X[];
    y: Y[];
}
```

## License

MIT
npm package: @putout/plugin-convert-imul-to-multiplication
Description: 🐊Putout plugin adds ability to convert 'Math.imul()' to operator '*'
Author: coderaiser
Latest version: 1.0.1

# @putout/plugin-convert-imul-to-multiplication [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-imul-to-multiplication.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-imul-to-multiplication "npm"

> Multiplying two numbers stored internally as integers (which is only possible with **AsmJS** with imul is the only potential circumstance where `Math.imul()` may prove performant in current browsers.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Math.imul()` to `*` operator.
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/cef45d5cc2bfd0156ed8d483cb6104d9/89ab39b05d3093d399e718f5615efe92f484c538). Merged to [`@putout/plugin-math`](https://www.npmjs.com/package/@putout/plugin-math).

## Install

```
npm i @putout/plugin-convert-imul-to-multiplication -D
```

## Rule

Rule `convert-imul-to-multiplication` is enabled by default, to disable add to `.putout.json`:

```json
{
    "rules": {
        "convert-imul-to-multiplication": "off"
    }
}
```

## ❌ Example of incorrect code

```js
const a = Math.imul(b, c);

```

## ✅ Example of correct code

```js
const a = b * c;
```

## License

MIT
npm package: @putout/plugin-convert-index-of-to-includes
Description: 🐊Putout plugin adds ability to convert indexOf to includes
Author: coderaiser
Latest version: 3.0.0

# @putout/plugin-convert-index-of-to-includes [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-index-of-to-includes.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-index-of-to-includes "npm"

> The `includes()` method determines whether an array includes a certain value among its entries, returning `true` or `false` as appropriate.
>
> (c)[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `indexOf` to `includes`.

## Install

```
npm i @putout/plugin-convert-index-of-to-includes -D
```

## Rule

```json
{
    "rules": {
        "convert-index-of-to-includes": "on"
    }
}
```

## ❌ Example of incorrect code

```js
if (~array.indexOf(element)) {}
```

## ✅ Example of correct code

```js
if (array.includes(element)) {}
```

## License

MIT
npm package: @putout/plugin-convert-is-nan-to-number-is-nan
Description: putout plugin adds ability to convert isNaN to Number.isNaN
Author: coderaiser
Latest version: 1.0.0

# @putout/plugin-convert-is-nan-to-number-is-nan [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-is-nan-to-number-is-nan.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-is-nan-to-number-is-nan "npm"
[DependencyStatusURL]: https://david-dm.org/coderaiser/putout?path=packages/plugin-convert-is-nan-to-number-is-nan
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-convert-is-nan-to-number-is-nan

`putout` plugin adds ability to convert `isNaN` to more robust [Number.isNaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN).

## Install

```
npm i @putout/plugin-convert-is-nan-to-number-is-nan -D
```

## Rule

```json
{
    "rules": {
        "convert-is-nan-to-number-is-nan": "on"
    }
}
```

## ❌ Incorrect code example

```js
if (isNaN(x)) {
    return 'NaN';
}
```

## ✅ Correct code Example

```js
if (Number.isNaN(x)) {
    return 'Number NaN';
}
```

## License

MIT
npm package: @putout/plugin-convert-label-to-object
Description: 🐊Putout plugin adds ability to find and convert 'label' to 'object'
Author: coderaiser
Latest version: 2.0.1

# @putout/plugin-convert-label-to-object [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-label-to-object.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-label-to-object "npm"

> A **labeled statement** is any `statement` that is prefixed with an `identifier`. You can jump to this label using a `break` or `continue` statement nested within the labeled statement.
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/label)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and convert `label` to `object`. Merged to [`@putout/plugin-labels`](https://www.npmjs.com/package/@putout/plugin-labels).

Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/86e2915cc2cffb6c26dd3bc2f2379a71/605562cf1fdf77a7918792955601e6767a805050).

## Install

```
npm i @putout/plugin-convert-label-to-object
```

## Rule

```json
{
    "rules": {
        "convert-label-to-object": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const a = () => {
    hello: 'world';
    x: 'm';
};
```

## ✅ Example of correct code

```js
const a = () => ({
    hello: 'world',
    x: 'm',
});
```

## License

MIT
npm package: @putout/plugin-convert-map-to-for-of
Description: 🐊Putout plugin adds ability to convert map to for...of
Author: coderaiser
Latest version: 2.0.3

# @putout/plugin-convert-map-to-for-of [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-map-to-for-of.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-map-to-for-of "npm"

> - The [`map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) method creates a new array populated with the results of calling a provided function on every element in the calling array.
>
> - The [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement creates a loop which invokes a custom iteration hook with statements to be executed for the value of each element of an array.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `map` to `for...of` loop. Merged to [`@putout/plugin-for-of`](https://www.npmjs.com/package/@putout/plugin-for-of').

## Install

```
npm i @putout/plugin-convert-map-to-for-of -D
```

## Rule

```json
{
    "rules": {
        "convert-map-to-for-of": "on"
    }
}
```

## ❌ Example of incorrect code

```js
names.map((name) => {
    alert(`hello ${name}`);
});
```

## ✅ Example of correct code

```js
for (const name of names) {
    alert(`hello ${name}`);
}
```

## License

MIT
npm package: @putout/plugin-convert-math-pow
Description: 🐊Putout plugin adds ability to convert 'Math.pow()' to 'exponentiation operator'
Author: coderaiser
Latest version: 5.0.2

# @putout/plugin-convert-math-pow [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-math-pow.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-math-pow "npm"

> - The [`Math.pow()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow) static method, given two arguments, base and exponent, returns baseexponent.
> - The [**exponentiation operator**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation) (`**`) returns the result of raising the first operand to the power of the second operand. It is equivalent to `Math.pow`, except it also accepts BigInts as operands.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Math.pow` to **exponentiation operator**. Merged to [@putout/plugin-math](https://www.npmjs.com/package/@putout/plugin-math).

## Install

```
npm i @putout/plugin-convert-math-pow -D
```

## Rule

```json
{
    "rules": {
        "convert-math-pow": "on"
    }
}
```

## ❌ Example of incorrect code

```js
Math.pow(2, 4);
```

## ✅ Example of correct code

```js
2 ** 4;
```

## Comparison

Linter | Rule | Fix
--------|-------|------------|
🐊 **Putout** | [`convert-math-pow`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-math-pow#readme) | ✅
⏣ **ESLint** | [`prefer-exponentiation-operator`](https://eslint.org/docs/rules/prefer-exponentiation-operator) | ✅

## License

MIT
npm package: @putout/plugin-convert-mock-require-to-mock-import
Description: 🐊Putout plugin adds ability to convert mockRequire to mockImport
Author: coderaiser
Latest version: 4.1.1

# @putout/plugin-convert-mock-require-to-mock-import [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-mock-require-to-mock-import.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-mock-require-to-mock-import "npm"

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert [mockRequire](https://github.com/boblauer/mock-require) to [mockImport](https://github.com/coderaiser/mock-import). Moved to [`@putout/plugin-tape`](https://www.npmjs.com/package/@putout/plugin-tape).

## Install

```
npm i @putout/plugin-convert-mock-require-to-mock-import -D
```

## Rule

Rule `convert-mock-require-to-mock-import` is enabled by default for `*.mjs`, to disable add to `.putout.json`:
Good complement of [@putout/plugin-tape](https://github.com/coderaiser/putout/tree/master/packages/plugin-tape#putoutplugin-tape-)

```json
{
    "rules": {
        "convert-mock-require-to-mock-import": "off"
    }
}
```

## ❌ Example of incorrect code

```js
const mockRequire = require('mock-require');

const {reRequire, stopAll} = mockRequire;

test('', (t) => {
    mockRequire('fs/promises', {
        unlink: stub(),
    });
    
    const fn = reRequire('..');
    fn();
    
    stopAll();
    t.end();
});
```

## ✅ Example of correct code

```js
import {createMockImport} from 'mock-import';

const {
    mockImport,
    reImport,
    stopAll,
} = createMockImport(import.meta.url);

test('', async (t) => {
    mockImport('fs/promises', {
        unlink: stub(),
    });
    
    const fn = await reImport('..');
    fn();
    
    stopAll();
    t.end();
});
```

## License

MIT
npm package: @putout/plugin-convert-object-assign-to-merge-spread
Description: 🐊Putout plugin adds ability to convert Object.assign to merge spread
Author: coderaiser
Latest version: 7.0.1

# @putout/plugin-convert-object-assign-to-merge-spread [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-assign-to-merge-spread.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-assign-to-merge-spread "npm"

> The [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) method copies all enumerable own properties from one or more source objects to a target object and returns the modified target object.
>
> [**Spread**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) syntax (`...`) allows an object expression to be expanded in places where zero or more key-value pairs are expected.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.assign()` to merge **spread** since it shorter but does (mostly) the same. Merged with [`@putout/plugin-spread`](https://www.npmjs.com/package/@putout/plugin-spread#convert-object-assign-to-merge-spread).

## Install

```
npm i @putout/plugin-convert-object-assign-to-merge-spread -D
```

## Rule

```json
{
    "rules": {
        "convert-object-assign-to-merge-spread": "on"
    }
}
```

## ❌ Example of incorrect code

```js
function merge(a) {
    return Object.assign({}, a, {
        hello: 'world',
    });
}
```

## ✅ Example of correct code

```js
function merge(a) {
    return {
        ...a,
        hello: 'world',
    };
}
```

## Comparison

Linter | Rule | Fix
--------|-------|------------|
🐊 **Putout** | [`convert-object-assign-to-merge-spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-object-assign-to-merge-spread#readme) | ✅
⏣ **ESLint** | [`prefer-object-spread`](https://eslint.org/docs/rules/prefer-object-spread) | ✅

## License

MIT
npm package: @putout/plugin-convert-object-entries-to-array-entries
Description: 🐊Putout plugin adds ability to convert 'const' to 'let'
Author: coderaiser
Latest version: 4.0.0

# @putout/plugin-convert-object-entries-to-array-entries [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-entries-to-array-entries.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-entries-to-array-entries "npm"

> The `Object.entries()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.
>
> (c) [`Object.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)

> The `entries()` method returns a new `Array Iterator` object that contains the key/value pairs for each index in the array.
>
> (c) [`Array.prototype.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.entries()` to `Array.prototype.entries()` to avoid bugs
related to using `index` in unary (`!index`) or binary (`index > length`) expressions, the thing is `Object.entries()` returns list of `Array<String, any>` tuples,
and `Array.prototype.entries()` returns list of `Array<Number, any>` tuples it can lead to bugs when you expected that `index` is number.

Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/f902e1f52d551545cede97db4cfba345/dbae8bfd2c4b0b4ec9612e2002a87c2a5961204d).

## Install

```
npm i @putout/plugin-convert-object-entries-to-array-entries -D
```

## Rule

```json
{
    "rules": {
        "convert-object-entries-to-array-entries": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const {entries} = Object;

for (const [i, token] of entries(tokens)) {
    if (!i)
        continue;
    
    fn(token);
}
```

## ✅ Example of correct code

```js
for (const [i, token] of tokens.entries()) {
    if (!i)
        continue;
    
    fn(token);
}
```

## License

MIT
npm package: @putout/plugin-convert-object-entries-to-object-keys
Description: 🐊Putout plugin adds ability to convert 'Object.entries()' to 'Object.keys()'
Author: coderaiser
Latest version: 1.0.2

# @putout/plugin-convert-object-entries-to-object-keys [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-entries-to-object-keys.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-entreis-to-object-keys "npm"

> The `Object.keys()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.
>
> (c) [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)

> The `Object.entries()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.
>
> (c) [`Object.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.entries()` to `Object.keys()`

## Install

```
npm i @putout/plugin-convert-object-entries-to-object-keys -D
```

Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/82cf60991515c274d0ba08f2ca36e9e6/a56a4bddfb45007434f2d24e9573a3d7646ea11d).

## Rule

```json
{
    "rules": {
        "convert-object-entries-to-object-keys": "on"
    }
}
```

## ❌ Example of incorrect code

```js
for (const [name] of Object.entries(tokens)) {
    console.log(name);
}

for (const [name] of entries(tokens)) {
    console.log(name);
}
```

## ✅ Example of correct code

```js
for (const name of Object.keys(tokens)) {
    console.log(name);
}

for (const name of keys(tokens)) {
    console.log(name);
}
```

## License

MIT
npm package: @putout/plugin-convert-object-keys-to-object-entries
Description: 🐊Putout plugin adds ability to convert 'Object.keys()' to 'Object.entries()'
Author: coderaiser
Latest version: 1.0.0

# @putout/plugin-convert-object-keys-to-object-entries [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-object-keys-to-object-entries.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-object-entreis-to-object-keys "npm"

> The `Object.keys()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.
>
> (c) [`Object.keys()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)

> The `Object.entries()` static method returns an array of a given object's own enumerable string-keyed property key-value pairs.
>
> (c) [`Object.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Object.entries()` to `Object.keys()`

## Install

```
npm i @putout/plugin-convert-object-keys-to-object-entries -D
```

Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/82cf60991515c274d0ba08f2ca36e9e6/a56a4bddfb45007434f2d24e9573a3d7646ea11d).

## Rule

```json
{
    "rules": {
        "convert-object-keys-to-object-entries": "on"
    }
}
```

## ❌ Example of incorrect code

```js
for (const [key, value] of Object.keys(tokens)) {
    console.log(key, value);
}

for (const [key, value] of keys(tokens)) {
    console.log(key, value);
}
```

## ✅ Example of correct code

```js
for (const [key, value] of Object.entries(tokens)) {
    console.log(key, value);
}

for (const [key, value] of Object.entries(tokens)) {
    console.log(key, value);
}
```

## License

MIT
npm package: @putout/plugin-convert-quotes-to-backticks
Description: 🐊Putout plugin adds ability to convert quotes to backticks
Author: coderaiser
Latest version: 5.0.1

# @putout/plugin-convert-quotes-to-backticks [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-quotes-to-backticks.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-quotes-to-backticks "npm"

> Template literals are literals delimited with **backticks** (`).
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert **quotes** to **backticks**. Related to [@putout/plugin-remove-useless-escape](https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-escape#readme).

## Install

```
npm i @putout/plugin-convert-quotes-to-backticks -D
```

## Rule

```json
{
    "rules": {
        "convert-quotes-to-backticks": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const a = 'hello \'world\'';
```

## ✅ Example of correct code

```js
const a = `hello 'world'`;
```

## License

MIT
npm package: @putout/plugin-convert-reduce-to-for-of
Description: 🐊Putout plugin adds ability to convert '.reduce()' to 'for...of'
Author: coderaiser
Latest version: 1.4.1

# @putout/plugin-convert-reduce-to-for-of [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-reduce-to-for-of.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-reduce-to-for-of "npm"

> - The [`reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) method executes a user-supplied **reducer** callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.
>
> - The [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) statement creates a loop which invokes a custom iteration hook with statements to be executed for the value of each element of an array.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `.reduce()` to `for...of` loop. Merged to [`@putout/plugin-for-of`](https://www.npmjs.com/package/@putout/plugin-for-of).
You should always look at second argument of a **reducer** since it changes logic drastically and should read back and forth a couple times to understand what is going on.

> Recursive functions like `.reduce()` can be powerful but sometimes difficult to understand, especially for less experienced **JavaScript** developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `.reduce()`. In cases where `.reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#when_to_not_use_reduce)

Check it out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/107751499a4bbdd83b9181444d8bdbbd/8d3b646a3df0025d564e2bb141cc7f6a6bb1b3a5).

## Install

```
npm i @putout/plugin-convert-reduce-to-for-of -D
```

## Rule

```json
{
    "rules": {
        "convert-reduce-to-for-of": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const result = list.reduce((a, b) => a + b, 1);
```

## ✅ Example of correct code

```js
let sum = 1;

for (const a of list) {
    sum += a;
}
```

## License

MIT
npm package: @putout/plugin-convert-spread-to-array-from
Description: putout plugin adds ability to convert spread to Array.from
Author: coderaiser
Latest version: 2.0.0

# putout-plugin-convert-spread-to-array-from [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL]

[NPMIMGURL]:                https://img.shields.io/npm/v/@putout/plugin-convert-spread-to-array-from.svg?style=flat&longCache=true
[NPMURL]:                   https://npmjs.org/package/@putout/plugin-convert-spread-to-array-from"npm"

[DependencyStatusURL]:      https://david-dm.org/coderaiser/putout?path=packages/plugin-convert-spread-to-array-from
[DependencyStatusIMGURL]:   https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-convert-spread-to-array-from

`putout` plugin convert `spread` to `Array.from`.

## Install

```
npm i @putout/plugin-convert-spread-to-array-from
```

## Rule

```json
{
    "rules": {
        "convert-spread-to-array-from": true
    }
}
```

## ❌ Incorrect code example

```js
const places = [
    ...runPlugins(),
];
```

## ✅ Correct code Example

```js
const places = Array.from(runPlugins());
```

## License

MIT
npm package: @putout/plugin-convert-sqrt-to-hypot
Description: 🐊Putout plugin adds ability to convert 'Math.sqrt()' to 'Math.hypot()'
Author: coderaiser
Latest version: 1.0.2

# @putout/plugin-convert-sqrt-to-hypot [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-sqrt-to-hypot.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-sqrt-to-hypot "npm"

> The `Math.hypot()` function returns the square root of the sum of squares of its arguments.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `Math.sqrt()` to `Math.hypot()`.
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/a35660f8883687ddfe53f8fbc36706ad/d83e26a547f71128f94af1d3fd542557ce820f1a).
Merged to [`@putout/plugin-math`](https://npmjs.org/package/@putout/plugin-math).

## Install

```
npm i @putout/plugin-sqrt-to-hypot -D
```

## Rule

Rule `convert-sqrt-to-hypot` is enabled by default, to disable add to `.putout.json`:

```json
{
    "rules": {
        "convert-sqrt-to-hypot": "off"
    }
}
```

## ❌ Example of incorrect code

```js
Math.sqrt(a ** 2, b ** 2);

```

## ✅ Example of correct code

```js
Math.hypot(a, b);
```

## License

MIT
npm package: @putout/plugin-convert-template-to-string
Description: 🐊Putout plugin adds ability to find and remove useless template string
Author: coderaiser
Latest version: 3.0.0

# @putout/plugin-convert-template-to-string [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-template-to-string.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-template-to-string"npm"

> - [**Template literals**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) are literals delimited with backticks (`), allowing embedded expressions called substitutions.
> - The [**`String`**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) object is used to represent and manipulate a sequence of characters.
>
> (c) MDN

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and convert **Template Literals** to calling of `String` constructor.

## Install

```
npm i @putout/plugin-convert-template-to-string
```

## Rule

```json
{
    "rules": {
        "convert-template-to-string": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const s = `${a + b}`;
```

## ✅ Example of correct code

```js
const s = String(a + b);
```

## License

MIT
npm package: @putout/plugin-convert-throw
Description: 🐊Putout plugin adds ability to convert throw statement into throw expression
Author: coderaiser
Latest version: 2.0.0

# @putout/plugin-convert-throw [![NPM version][NPMIMGURL]][NPMURL]

> This proposal defines new syntax to **throw** exceptions from within an expression context.
>
> (c) [tc39](https://github.com/tc39/proposal-throw-expressions#status)

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-throw.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-throw "npm"

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability convert **throw** statement to expression.

## Install

```
npm i @putout/plugin-convert-throw -D
```

## Rule

```json
{
    "rules": {
        "convert-throw": "on"
    },
    "plugins": [
        "convert-throw"
    ]
}
```

## ❌ Example of incorrect code

```js
const fn = () => {
    throw Error('hello');
};
```

## ✅ Example of correct code

```js
const fn = () => throwError('hello');
```

## License

MIT
npm package: @putout/plugin-convert-to-arrow-function
Description: 🐊Putout plugin adds ability to convert anonymous to arrow function
Author: coderaiser
Latest version: 5.0.1

# @putout/plugin-convert-to-arrow-function [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-to-arrow-function.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-to-arrow-function "npm"

> An **arrow function** expression is a compact alternative to **anonymous function**.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin convert **anonymous** to **arrow function**.

## Install

```
npm i @putout/plugin-convert-to-arrow-function
```

## Rule

```json
{
    "rules": {
        "convert-to-arrow-function": "on"
    }
}
```

## ❌ Example of incorrect code

```js
module.exports = function(a, b) {};

function x() {
    return function(a) {
        return b;
    };
}

call(function() {
    return 'world';
});
```

## ✅ Example of correct code

```js
module.exports = (a, b) => {};

function x() {
    return (a) => {
        return b;
    };
}

call(() => {
    return 'world';
});
```

## Comparison

Linter | Rule | Fix
--------|-------|------------|
🐊 **Putout** | [`convert-to-arrow-function`](https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-to-arrow-function#readme) | ✅
⏣ **ESLint** | [`prefer-arrow-callback`](https://eslint.org/docs/latest/rules/prefer-arrow-callback) | ✅

## License

MIT
npm package: @putout/plugin-convert-top-level-return
Description: putout plugin adds ability to convert top-level return to process.exit
Author: coderaiser
Latest version: 4.0.1

# @putout/plugin-convert-top-level-return [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-top-level-return.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-top-level-return"npm"

🐊[`Putout`](https://github.com/coderaiser/putout) plugin adds ability convert `top-level return` into `process.exit`.
Moved to [@putout/plugin-nodejs](https://github.com/coderaiser/putout/tree/v24.0.1/packages/plugin-nodejs#remove-process-exit).

## Install

```
npm i @putout/plugin-convert-top-level-return -D
```

## Rule

```json
{
    "rules": {
        "convert-top-level-return": "on"
    }
}
```

## ❌ Incorrect code example

```js
return;
```

## ✅ Correct code Example

```js
process.exit();
```

## License

MIT
npm package: @putout/plugin-convert-typeof-to-is-type
Description: 🐊Putout plugin adds ability to convert typeof to is type
Author: coderaiser
Latest version: 2.0.1

# @putout/plugin-convert-typeof-to-is-type [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-typeof-to-is-type.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-typeof-to-is-type "npm"

> The `typeof` operator returns a string indicating the type of the unevaluated operand.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to convert `typeof` to `is type`. Merged to [`@putout/plugin-types`](https://www.npmjs.com/package/@putout/plugin-types).

## Install

```
npm i @putout/plugin-convert-typeof-to-is-type -D
```

## Rule

```json
{
    "rules": {
        "convert-typeof-to-is-type": "on"
    }
}
```

## ❌ Example of incorrect code

```js
if (typeof a === 'boolean')
    return x;
```

## ✅ Example of correct code

```js
const isBool = (a) => typeof a === 'boolean';

if (isBool(a))
    return x;
```

## License

MIT
npm package: @putout/plugin-coverage
Description: 🐊Putout plugin helps with coverage configs
Author: coderaiser
Latest version: 3.0.0

# @putout/plugin-coverage [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-coverage.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-coverage "npm"

🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with coverage configuration files, like :`.nycrc.json`, `c8rc.json`.
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/104468b5dc2f2f39bbddd327bbcfc8cf/494e50c1c06a1626f24ac948a0685ccc711be97d).

## Install

```
npm i @putout/plugin-coverage -D
```

## Rules

- ✅ [add-to-exclude](#add-to-exclude);
- ✅ [sort-ignore](#sort-ignore);

## File rules

- ✅ [remove-files](#remove-files)

## Config

```json
{
    "rules": {
        "coverage/add-to-exclude": ["on", {
            "dismiss": ["*.spec.*"]
        }],
        "coverage/sort-ignore": "on",
        "coverage/remove-files": "on"
    }
}
```

## add-to-exclude

```diff
{
    "exclude": [
-       "test"
+       "test",
+       *.config.*
    ]
}
```

## sort-ignore

### ❌ Example of incorrect code

```json
{
    "exclude": [
        "**/*.spec.*",
        "**/fixture",
        "test",
        ".*.*",
        "**/*.config.*"
    ]
}
```

### ✅ Example of correct code

```json
{
    "exclude": [
        "**/*.spec.*",
        "**/fixture",
        "**/*.config.*",
        ".*.*",
        "test"
    ]
}
```

## remove-files

```diff
/
-├── .nyc_output
-└── coverage
```

## License

MIT
npm package: @putout/plugin-declare-before-reference
Description: 🐊Putout plugin adds ability move declarations before references
Author: coderaiser
Latest version: 10.4.0

# @putout/plugin-declare-before-reference [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-declare-before-reference.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-declare-before-reference "npm"

> The `ReferenceError` object represents an error when a variable hasn't yet been initialized in the current scope is referenced.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply declare before reference to avoid `ReferenceError`.

The rule is similar to **ESLint's** [no-use-before-define](https://eslint.org/docs/rules/no-use-before-define), but it's auto fixable,
and ignores:

- ✅ Function declarations
- ✅ Class declarations
- ✅ Different scopes

Also it works only on top level and helps to [@operator/declare](https://github.com/coderaiser/putout/tree/master/packages/operator-declare#readme) with a bunch of nested declarations.

## Install

```
npm i @putout/plugin-declare-before-reference
```

## Rule

```json
{
    "rules": {
        "declare-before-reference": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const {remove} = operator;

const {types, operator} = require('putout');
```

## ✅ Example of correct code

```js
const {types, operator} = require('putout');

const {remove} = operator;
```

## Comparison

Linter | Rule | Fix
--------|-------|------------|
🐊 **Putout** | [`declare-before-reference`](https://github.com/coderaiser/putout/tree/master/packages/plugin-declare-before-reference#readme) | ✅
⏣ **ESLint** | [`no-use-before-define`](https://eslint.org/docs/rules/no-use-before-define) | ❌

## License

MIT
npm package: @putout/plugin-declare-imports-first
Description: 🐊Putout plugin adds ability to declare imports first
Author: coderaiser
Latest version: 2.1.2

# @putout/plugin-declare-imports-first [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-declare-imports-first.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-declare-imports-first "npm"

> The static `import` declaration is used to import read-only live bindings which are exported by another module.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to declare imports first. For CommonJS use [nodejs/declare-after-require](https://github.com/coderaiser/putout/tree/master/packages/plugin-nodejs#declare-after-require).

Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/b1c18e5d726afe4ebb69d6b7a7dda82b/8189590815a1b8adb35bb8a846e28228e3c7fadf). Merged with [`@putout/plugin-esm`](https://www.npmjs.com/package/@putout/plugin-esm).

## Install

```
npm i @putout/plugin-declare-imports-first
```

## Rule

```json
{
    "rules": {
        "declare-imports-first": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const [arg] = process.argv;
import esbuild from 'esbuild';
```

## ✅ Example of correct code

```js
import esbuild from 'esbuild';

const [arg] = process.argv;
```

## License

MIT
npm package: @putout/plugin-docker
Description: 🐊Putout plugin helps with Dockerfile
Author: coderaiser
Latest version: 1.0.1

# @putout/plugin-docker [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-docker.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-docker "npm"

> A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. This page describes the commands you can use in a Dockerfile.

> (c) [docker.com](https://docs.docker.com/reference/dockerfile/)

🐊[**Putout**](https://docker.com/coderaiser/putout) plugin helps with `Dockerfile`.

## Install

```
npm i @putout/plugin-docker -D
```

## Rules

- ✅ [convert-maintainer-to-label](#convert-maintainer-to-label);

## Config

```json
{
    "rules": {
        "docker/convert-maintainer-to-label": "on"
    }
}
```

## convert-maintainer-to-label

> The `MAINTAINER` instruction, used historically for specifying the author of the Dockerfile, is deprecated. To set author metadata for an image, use the `org.opencontainers.image.authors` [OCI label](https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys).
>
> (c) [docker.com](https://docs.docker.com/reference/build-checks/maintainer-deprecated/)

Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/e8ba5e086a6bd2e33a8782c25b228100/e4cc634582c83ffb3876932be19505946c12226e).

```diff
-MAINTAINER hello
+LABEL hello
```

## License

MIT
npm package: @putout/plugin-extract-keywords-from-variables
Description: 🐊Putout plugin adds ability to extract keywords from variables
Author: coderaiser
Latest version: 3.0.0

# @putout/plugin-extract-keywords-from-variables [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-extract-keywords-from-variables.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-extract-keywords-from-variables "npm"

> The JavaScript exceptions "unexpected token" occur when the parser does not see a token it recognizes at the given position, so it cannot make sense of the structure of the program. This might be a simple typo.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Unexpected_token)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to extract `keywords` from variables. Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/fcaedaa9daf7f3a771274aca0da9ab1b/00850a5d28aec86b1b4083ba2ef9f81bd49aaaac).

## Install

```
npm i @putout/plugin-extract-keywords-from-variables -D
```

## Rule

```json
{
    "rules": {
        "extract-keywords-from-variables": "on"
    }
}
```

```diff
-export const isTemplateMiddle = (a) => a?.type === 'TemplateMiddle',
+export const isTemplateMiddle = (a) => a?.type === 'TemplateMiddle';
export const isTemplateTail = (a) => a?.type === 'TemplateTail';

-const a 5;
+const a = 5;

-export const packContent = (content) {
+export const packContent = (content) => {
    console.log(a);
}
```

## License

MIT
npm package: @putout/plugin-extract-object-properties
Description: 🐊Putout plugin adds ability to extract object properties into variable
Author: coderaiser
Latest version: 10.0.1

# @putout/plugin-extract-object-properties [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-extract-object-properties.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-extract-object-properties "npm"

> The **destructuring assignment** makes possible to unpack values from objects into distinct variables.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply destructuring to extract object properties. Merged with [`@putout/plugin-destructuring`](https://www.npmjs.com/package/@putout/plugin-destructuring).

## Install

```
npm i @putout/plugin-extract-object-properties -D
```

## Rule

```json
{
    "rules": {
        "extract-object-properties/equal-deep": "on",
        "extract-object-properties/not-equal-deep": "on"
    }
}
```

## Equal Deep

### ❌ Example of incorrect code

```js
const {replaceWith} = a.operate;
const {isIdentifier} = a.types;
```

### ✅ Example of correct code

```js
const {operator, types} = a;

const {replaceWith} = operator;
const {isIdentifier} = types;
```

## Not Equal Deep

### ❌ Example of incorrect code

```js
const {replaceWith} = a;
const {isIdentifier} = a.types;
```

### ✅ Example of correct code

```js
const {replaceWith, types} = a;

const {isIdentifier} = types;
```

## License

MIT
npm package: @putout/plugin-extract-sequence-expressions
Description: 🐊Putout plugin adds ability to extract sequence expressions
Author: coderaiser
Latest version: 4.1.0

# @putout/plugin-extract-sequence-expressions [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-extract-sequence-expressions.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-extract-sequence-expressions"npm"

> The comma operator (`,`) evaluates each of its operands (from left to right) and returns the value of the last operand. This lets you create a compound expression in which multiple expressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to extract **sequence expressions**. Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/785d072fc20d0a3854f6ced093918b06/483b359357ebc04232f4a321bd3db627dc6a15cb).

☝️*Remember, when you [writing a transform](https://github.com/coderaiser/putout/tree/master/packages/engine-runner#readme) you can skip all parts related to **extracting sequence expressions** and just reuse current **plugin** it will make your code simpler and less error prone.*

## Install

```
npm i @putout/plugin-extract-sequence-expressions -D
```

## Rule

```json
{
    "rules": {
        "extract-sequence-expressions": "on"
    }
}
```

## ❌ Example of incorrect code

```js
(module.exports.x = 1, module.exports.y = 2);

fn((a, b));
(fn(a), 'hello');

(fn(a), b = 3);
(fn(a), fn(b));

if ((a, b, c)) {}
```

## ✅ Example of correct code

```js
module.exports.x = 1;
module.exports.y = 2;

fn(a, b);
fn(a, 'hello');

fn(a);
b = 3;

fn(a);
fn(b);

a;
b;

if (c) {}
```

## Comparison

Linter | Rule | Fix
--------|-------|------------|
🐊 **Putout**| [`extract-sequence-expressions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-extract-sequence-expressions#readme)| ✅
⏣ **ESLint** | [`no-sequences`](https://eslint.org/docs/rules/no-sequences) | ❌

## License

MIT
npm package: @putout/plugin-generators
Description: 🐊Putout plugin improves code related to generators
Author: coderaiser
Latest version: 2.0.0

# @putout/plugin-generators [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-generators.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-generators"npm"

> The `function*` declaration creates a binding of a new generator function to a given name. A generator function can be exited and later re-entered, with its context (variable bindings) saved across re-entrances.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin improves `Generator`-related code.

## Install

```
npm i @putout/plugin-generators -D
```

## Rules

- ✅ [add-missing-star](#add-missing-star);
- ✅ [convert-multiple-to-generator](#convert-multiply-to-generator);

## Config

```json
{
    "rules": {
        "generators/add-missing-star": "on",
        "generators/convert-multiple-to-generator": "on"
    }
}
```

## add-missing-star

> The `function*` declaration creates a binding of a new generator function to a given name.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*)

### ❌ Example of incorrect code

```js
function hello() {
    yield;
    'world';
}

function func2() {
    yield * func1();
}
```

### ✅ Example of correct code

```js
function* hello() {
    yield 'world';
}

function* func2() {
    yield* func1();
}
```

## convert-multiply-to-generator

Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/1c5326b470677a2ab253963fe39971f2/860b7eafb0bdd33ec007e709e7825c47bbc38940).

### ❌ Example of incorrect code

```js
const a = 5 * function hello() {};
```

### ✅ Example of correct code

```js
const a = 5;

function* hello() {}
```

## License

MIT
npm package: @putout/plugin-gitignore
Description: 🐊Putout plugin helps with .gitignore
Author: coderaiser
Latest version: 7.0.4

# @putout/plugin-gitignore [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-gitignore.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-gitignore "npm"

> A `.gitignore` file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected.
>
> (c) [git-scm.com](https://git-scm.com/docs/gitignore)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with `.gitignore`.

## Install

```
npm i @putout/plugin-gitignore -D
```

## Rules

- ✅ [add](#add);
- ✅ [sort](#sort);

## Config

```json
{
    "rules": {
        "gitignore/add": ["on", {
            "dismiss": [
                "*.swp",
                "coverage",
                "*.lock",
                "*.log"
            ]
        }],
        "gitignore/sort": "on"
    }
}
```

## add

Adds `.putoutcache`, `*.swp`, `.idea`:

```diff
node_modules
+.putoutcache
+*.swp
+.idea
```

## sort

### ❌ Example of incorrect code

```ignore
node_modules
*.swp
yarn-error.log
yarn.lock
.idea
.DS_Store
deno.lock

coverage
.filesystem.json
```

### ✅ Example of correct code

```ignore
.idea
.filesystem.json
.DS_Store

*.swp

yarn-error.log
yarn.lock
deno.lock

node_modules
coverage# sort
```

## License

MIT