@putout/plugin-remove-duplicate-keys

putout plugin adds ability to find and remove duplicate keys

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@putout/plugin-remove-duplicate-keys
46103.0.0a year ago3 years agoMinified + gzip package size for @putout/plugin-remove-duplicate-keys in KB

Readme

@putout/plugin-remove-duplicate-keys !NPM versionNPMIMGURLNPMURL
An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).
(c) MDN

🐊Putout plugin adds ability to find and remove duplecate keys.

Install

npm i @putout/plugin-remove-duplicate-keys

Rule

{
    "rules": {
        "remove-duplicate-keys": "on"
    }
}

āŒ Example of incorrect code

const a = {
    x: 'hello',
    ...z,
    x: 'world',
};

āœ… Example of correct code

const a = {
    ...z,
    x: 'world',
};

License

MIT