@putout/plugin-remove-duplicate-keys

5.1.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

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

14,508

Version

5.1.0

License

MIT

Unpacked Size

7.51 kB

Total Files

4

Last publish

Collaborators

  • coderaiser