@putout/plugin-putout 29.35.1 β 29.36.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
CHANGED
|
@@ -2241,6 +2241,7 @@ module.exports.replace = () => ({
|
|
|
2241
2241
|
|
|
2242
2242
|
Checkout in π**Putout Editor**:
|
|
2243
2243
|
|
|
2244
|
+
- β
[`add-missing-semicolon`](https://putout.cloudcmd.io/#/gist/7c7ab5cbedef8d6021ce2a77b5caa4f0/aee514d0cc4ef0ea26f4fdcf4def03a078eb1bd0);
|
|
2244
2245
|
- β
[`sort-contents`](https://putout.cloudcmd.io/#/gist/647bcc98ba9eeaa619dfa90d129ee0ec/a19ba868e8c2f97292e763675de65cc1ec98ff66);
|
|
2245
2246
|
- β
[`sort-headings`](https://putout.cloudcmd.io/#/gist/a5a23310a84cb209e7e5537bab294ab2/0ecd88ffa6e37ac2553cabe5333d307aed2c4a7d);
|
|
2246
2247
|
- β
[`sort-config`](https://putout.cloudcmd.io/#/gist/41c9975090803fdee30c445868e5b93f/18f78a72eb4f4cf33f5137fca11de9314c12763c);
|
|
@@ -2,6 +2,7 @@ import {operator} from 'putout';
|
|
|
2
2
|
import * as sortContents from './sort-contents/index.js';
|
|
3
3
|
import * as sortHeadings from './sort-headings/index.js';
|
|
4
4
|
import * as sortConfig from './sort-config/index.js';
|
|
5
|
+
import * as addMissingSemicolon from './add-missing-semicolon/index.js';
|
|
5
6
|
|
|
6
7
|
const {
|
|
7
8
|
matchFiles,
|
|
@@ -17,6 +18,7 @@ export const {
|
|
|
17
18
|
files: {
|
|
18
19
|
'README.md': {
|
|
19
20
|
plugins: [
|
|
21
|
+
['add-missing-semicolon', addMissingSemicolon],
|
|
20
22
|
['sort-contents', sortContents],
|
|
21
23
|
['sort-config', sortConfig],
|
|
22
24
|
['sort-headings', sortHeadings],
|
|
@@ -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
|
|
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:
|
|
61
|
+
path: currentPath,
|
|
56
62
|
list,
|
|
57
63
|
});
|
|
58
64
|
}
|
package/package.json
CHANGED