3.0.0 β’ Published 6 months ago
@putout/plugin-apply-arrow v3.0.0
@putout/plugin-apply-arrow 
An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate limitations in usage:
(c) MDN
πPutout plugin adds ability to convert Function Declaration to Arrow Function. Checkout in πPutout Editor.
Install
npm i @putout/plugin-apply-arrowRule
{
"rules": {
"apply-arrow": ["on", {
"maxSize": 30
}]
}
}β Example of incorrect code
export function replace() {
return {
'if __a > __b': 'if (__a > __b)',
};
}β Example of correct code
export const replace = () => ({
'if __a > __b': 'if (__a > __b)',
});License
MIT