oxlint-plugin-react-doctor 0.9.0-dev.30369b6 → 0.9.0-dev.707378a
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/dist/index.js +8 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1017,11 +1017,14 @@ const forEachChildNode = (node, visit) => {
|
|
|
1017
1017
|
};
|
|
1018
1018
|
const walkAst = (node, visitor) => {
|
|
1019
1019
|
if (!node || typeof node !== "object") return;
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1020
|
+
const pendingNodes = [node];
|
|
1021
|
+
while (pendingNodes.length > 0) {
|
|
1022
|
+
const currentNode = pendingNodes.pop();
|
|
1023
|
+
if (currentNode === void 0 || visitor(currentNode) === false) continue;
|
|
1024
|
+
const childNodes = [];
|
|
1025
|
+
forEachChildNode(currentNode, (childNode) => childNodes.push(childNode));
|
|
1026
|
+
for (let childIndex = childNodes.length - 1; childIndex >= 0; childIndex -= 1) pendingNodes.push(childNodes[childIndex]);
|
|
1027
|
+
}
|
|
1025
1028
|
};
|
|
1026
1029
|
//#endregion
|
|
1027
1030
|
//#region src/plugin/rules/state-and-effects/activity-wraps-effect-heavy-subtree.ts
|