@putout/plugin-remove-duplicate-keys 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/lib/remove-duplicate-keys.js +1 -1
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
# @putout/plugin-remove-duplicate-keys [![NPM version][NPMIMGURL]][NPMURL]
|
|
1
|
+
# @putout/plugin-remove-duplicate-keys [![NPM version][NPMIMGURL]][NPMURL]
|
|
2
2
|
|
|
3
3
|
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-duplicate-keys.svg?style=flat&longCache=true
|
|
4
4
|
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-duplicate-keys"npm"
|
|
5
|
-
[DependencyStatusURL]: https://david-dm.org/coderaiser/putout?path=packages/plugin-remove-duplicate-keys
|
|
6
|
-
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-remove-duplicate-keys
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
> 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 (`{}`).
|
|
7
|
+
>
|
|
8
|
+
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer)
|
|
9
|
+
|
|
10
|
+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove duplecate keys.
|
|
9
11
|
|
|
10
12
|
## Install
|
|
11
13
|
|
|
@@ -23,7 +25,7 @@ npm i @putout/plugin-remove-duplicate-keys
|
|
|
23
25
|
}
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
## ❌
|
|
28
|
+
## ❌ Example of incorrect code
|
|
27
29
|
|
|
28
30
|
```js
|
|
29
31
|
const a = {
|
|
@@ -33,7 +35,7 @@ const a = {
|
|
|
33
35
|
};
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
## ✅
|
|
38
|
+
## ✅ Example of correct code
|
|
37
39
|
|
|
38
40
|
```js
|
|
39
41
|
const a = {
|
|
@@ -15,7 +15,7 @@ const isObjectPropertyLiteral = (value) => (a) => isObjectProperty(a) && isStrin
|
|
|
15
15
|
|
|
16
16
|
const store = fullstore([]);
|
|
17
17
|
|
|
18
|
-
module.exports.report = () => '
|
|
18
|
+
module.exports.report = () => 'Avoid duplicate keys';
|
|
19
19
|
|
|
20
20
|
module.exports.replace = () => ({
|
|
21
21
|
__object: ({__object}) => {
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-remove-duplicate-keys",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"type": "commonjs",
|
|
4
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
5
|
-
"description": "putout plugin adds ability to find and remove
|
|
6
|
-
"homepage": "
|
|
6
|
+
"description": "putout plugin adds ability to find and remove duplicate keys",
|
|
7
|
+
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-duplicate-keys#readme",
|
|
7
8
|
"main": "lib/remove-duplicate-keys.js",
|
|
8
9
|
"release": false,
|
|
9
10
|
"tag": false,
|
|
@@ -34,21 +35,21 @@
|
|
|
34
35
|
"key"
|
|
35
36
|
],
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@putout/test": "^
|
|
38
|
+
"@putout/test": "^5.0.0",
|
|
38
39
|
"c8": "^7.5.0",
|
|
39
|
-
"eslint": "^8.0.
|
|
40
|
+
"eslint": "^8.0.1",
|
|
40
41
|
"eslint-plugin-node": "^11.0.0",
|
|
41
|
-
"eslint-plugin-putout": "^
|
|
42
|
+
"eslint-plugin-putout": "^14.0.0",
|
|
42
43
|
"lerna": "^4.0.0",
|
|
43
|
-
"madrun": "^
|
|
44
|
+
"madrun": "^9.0.0",
|
|
44
45
|
"nodemon": "^2.0.1"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"putout": ">=
|
|
48
|
+
"putout": ">=25"
|
|
48
49
|
},
|
|
49
50
|
"license": "MIT",
|
|
50
51
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
52
|
+
"node": ">=16"
|
|
52
53
|
},
|
|
53
54
|
"publishConfig": {
|
|
54
55
|
"access": "public"
|