@putout/plugin-convert-assignment-to-arrow-function
v1.2.2
Published
šPutout plugin adds ability convert assignment to arrow function
Maintainers
Readme
@putout/plugin-convert-assignment-to-arrow-function 
The assignment operator (
=) is used to assign a value to a variable. The assignment operation evaluates to the assigned value. Chaining the assignment operator is possible in order to assign a single value to multiple variables.
Merged to @putout/plugin-assignment.
An arrow function expression is a compact alternative to a function expression.
(c) MDN
šPutout plugin adds ability to convert assignment to arrow function.
Install
npm i @putout/plugin-convert-assignment-to-arrow-function -DRule
{
"rules": {
"convert-assignment-to-arrow-function": "on"
}
}ā Example of incorrect code
const createRegExp = a = RegExp(a, 'g');ā Example of correct code
const createRegExp = (a) => RegExp(a, 'g');License
MIT
