3.0.0 β€’ Published 6 months ago

@putout/plugin-apply-arrow v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@putout/plugin-apply-arrow NPM version

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-arrow

Rule

{
    "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

3.0.0

6 months ago

2.0.0

8 months ago

1.5.0

9 months ago

1.4.0

10 months ago

1.3.0

10 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago