@putout/plugin-remove-duplicate-keys

3.0.0 • Public • Published

@putout/plugin-remove-duplicate-keys NPM version

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

Keywords

none

Install

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

DownloadsWeekly Downloads

5,425

Version

3.0.0

License

MIT

Unpacked Size

6.26 kB

Total Files

4

Last publish

Collaborators

  • coderaiser