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.
Files changed (2) hide show
  1. package/dist/index.js +8 -5
  2. 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 visitNode = (current) => {
1021
- if (visitor(current) === false) return;
1022
- forEachChildNode(current, visitNode);
1023
- };
1024
- visitNode(node);
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-plugin-react-doctor",
3
- "version": "0.9.0-dev.30369b6",
3
+ "version": "0.9.0-dev.707378a",
4
4
  "description": "React Doctor rules for oxlint.",
5
5
  "keywords": [
6
6
  "accessibility",