New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@putout/plugin-apply-shorthand-properties

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-apply-shorthand-properties

putout plugin adds ability to apply shorthand properties


Version published
Weekly downloads
9K
increased by14.56%
Maintainers
1
Weekly downloads
 
Created

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

Rule

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

❌ 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

FAQs

Package last updated on 30 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts