1.2.0 • Published 3 years ago

@putout/plugin-convert-assignment-to-arrow-function v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@putout/plugin-convert-assignment-to-arrow-function NPM version Dependency Status

putout plugin adds ability to convert assignment to arrow function.

Install

npm i @putout/plugin-convert-assignment-to-arrow-function -D

Rule

{
    "rules": {
        "convert-assignment-to-arrow-function": "on"
    }
}

❌ Incorrect code example

const createRegExp = (a) => RegExp(a, 'g');

✅ Correct code Example

const createRegExp = (a) => RegExp(a, 'g');

License

MIT