oxlint-plugin-react-doctor 0.2.14-dev.6e59f10 → 0.2.14-dev.8b313ba
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 +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13289,12 +13289,21 @@ const getRef = (analysis, identifier) => {
|
|
|
13289
13289
|
for (const reference of scope.references) if (reference.identifier === identifier) return reference;
|
|
13290
13290
|
return null;
|
|
13291
13291
|
};
|
|
13292
|
+
const downstreamRefsCache = /* @__PURE__ */ new WeakMap();
|
|
13292
13293
|
const getDownstreamRefs = (analysis, node) => {
|
|
13294
|
+
let perNode = downstreamRefsCache.get(analysis);
|
|
13295
|
+
if (!perNode) {
|
|
13296
|
+
perNode = /* @__PURE__ */ new WeakMap();
|
|
13297
|
+
downstreamRefsCache.set(analysis, perNode);
|
|
13298
|
+
}
|
|
13299
|
+
const cached = perNode.get(node);
|
|
13300
|
+
if (cached) return cached;
|
|
13293
13301
|
const refs = [];
|
|
13294
13302
|
for (const identifier of findDownstreamNodes(node, "Identifier")) {
|
|
13295
13303
|
const ref = getRef(analysis, identifier);
|
|
13296
13304
|
if (ref) refs.push(ref);
|
|
13297
13305
|
}
|
|
13306
|
+
perNode.set(node, refs);
|
|
13298
13307
|
return refs;
|
|
13299
13308
|
};
|
|
13300
13309
|
const getCallExpr = (ref, current = ref.identifier.parent) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-react-doctor",
|
|
3
|
-
"version": "0.2.14-dev.
|
|
3
|
+
"version": "0.2.14-dev.8b313ba",
|
|
4
4
|
"description": "oxlint plugin for React Doctor: diagnose React codebases for security, performance, correctness, accessibility, bundle-size, and architecture issues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|