@putout/plugin-apply-shorthand-properties

    3.0.2 • Public • Published

    @putout/plugin-apply-shorthand-properties NPM version Dependency Status

    putout plugin adds ability to apply shorthand properties.

    Install

    npm i @putout/plugin-apply-shorthand-properties -D
    

    Config

    {
        "rules": {
            "apply-shorthand-properties": ["on", {
                "ignore": []
            }]
        },
        "plugins": [
            "apply-shorthand-properties"
        ]
    }

    Incorrect code example

    const AUTH_SESSION = 'xx';
    
    export const setSession = (session) => ({
        type: AUTH_SESSION,
        payload: session,
    });

    Correct code Example

    const type = 'xx';
    
    export const setSession = (payload) => ({
        type,
        payload,
    });

    License

    MIT

    Install

    npm i @putout/plugin-apply-shorthand-properties

    DownloadsWeekly Downloads

    1,891

    Version

    3.0.2

    License

    MIT

    Unpacked Size

    5.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser