@putout/plugin-putout 29.35.0 → 29.35.2

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 CHANGED
@@ -13,7 +13,7 @@ npm i @putout/plugin-putout -D
13
13
 
14
14
  ## Rules
15
15
 
16
- - ✅ [apply-type-check](#apply-type-check)
16
+ - ✅ [apply-type-check](#apply-type-check);
17
17
  - ✅ [add-await-to-progress](#add-await-to-progress);
18
18
  - ✅ [add-crawl-file](#add-crawl-file);
19
19
  - ✅ [add-path-arg-to-filter](#add-path-arg-to-filter);
@@ -86,6 +86,7 @@ npm i @putout/plugin-putout -D
86
86
  - ✅ [convert-traverse-to-super-traverse](#convert-traverse-to-super-traverse);
87
87
  - ✅ [convert-url-to-dirname](#convert-url-to-dirname);
88
88
  - ✅ [create-test](#create-test);
89
+ - ✅ [convert-replacer-to-includer](#convert-replacer-to-includer);
89
90
  - ✅ [declare](#declare);
90
91
  - ✅ [declare-path-variable](#declare-path-variable);
91
92
  - ✅ [declare-template-variables](#declare-template-variables);
@@ -100,11 +101,10 @@ npm i @putout/plugin-putout -D
100
101
  - ✅ [rename-operate-to-operator](#rename-operate-to-operator);
101
102
  - ✅ [replace-operate-with-operator](#replace-operate-with-operator);
102
103
  - ✅ [replace-test-message](#replace-test-message);
103
- - ✅ [shorten-imports](#shorten-imports);
104
- - ✅ [simplify-replace-template](#simplify-replace-template);
105
- - ✅ [convert-replacer-to-includer](#convert-replacer-to-includer);
106
104
  - ✅ [remove-useless-match](#remove-useless-match);
107
105
  - ✅ [remove-useless-type-check-declaration](#remove-useless-type-check-declaration);
106
+ - ✅ [shorten-imports](#shorten-imports);
107
+ - ✅ [simplify-replace-template](#simplify-replace-template);
108
108
  - ✅ [shorten-path-get](#shorten-path-get);
109
109
 
110
110
  ## File rules
@@ -26,8 +26,9 @@ export const traverse = ({listStore, push}) => ({
26
26
  exit() {
27
27
  const list = {};
28
28
  const ids = {};
29
+ const stored = listStore();
29
30
 
30
- for (const {node, parentPath} of listStore()) {
31
+ for (const {node, parentPath} of stored) {
31
32
  const {line} = parentPath.node.loc.start;
32
33
 
33
34
  ids[line] = parentPath;
@@ -51,8 +52,13 @@ export const traverse = ({listStore, push}) => ({
51
52
  }
52
53
 
53
54
  for (const [id, list] of entries(resultList)) {
55
+ const currentPath = ids[id];
56
+
57
+ if (currentPath.node.arguments.length !== list.length)
58
+ return;
59
+
54
60
  push({
55
- path: ids[id],
61
+ path: currentPath,
56
62
  list,
57
63
  });
58
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout",
3
- "version": "29.35.0",
3
+ "version": "29.35.2",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps with plugins development",