@eslint-react/core 5.2.4-next.0 → 5.2.4-next.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/dist/index.js +4 -4
- package/package.json +7 -8
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Check, Extract, Traverse, is, isOneOf } from "@eslint-react/ast";
|
|
|
2
2
|
import { resolveImportSource } from "@eslint-react/var";
|
|
3
3
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
4
4
|
import "@eslint-react/eslint";
|
|
5
|
-
import {
|
|
5
|
+
import { randomBytes } from "node:crypto";
|
|
6
6
|
import { JsxDetectionHint, isJsxLike } from "@eslint-react/jsx";
|
|
7
7
|
import { RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
|
|
8
8
|
import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/utils";
|
|
@@ -393,7 +393,7 @@ function getClassComponentCollector(context) {
|
|
|
393
393
|
const collect = (node) => {
|
|
394
394
|
if (!isClassComponent(node)) return;
|
|
395
395
|
const id = getClassId(node);
|
|
396
|
-
const key =
|
|
396
|
+
const key = randomBytes(8).toString("hex");
|
|
397
397
|
const name = id == null ? null : Extract.getFullyQualifiedName(id, getText);
|
|
398
398
|
components.set(key, {
|
|
399
399
|
id,
|
|
@@ -850,7 +850,7 @@ function getFunctionComponentCollector(context, options = {}) {
|
|
|
850
850
|
const getText = (n) => context.sourceCode.getText(n);
|
|
851
851
|
const getCurrentEntry = () => functionEntries.at(-1) ?? null;
|
|
852
852
|
const onFunctionEnter = (node) => {
|
|
853
|
-
const key =
|
|
853
|
+
const key = randomBytes(8).toString("hex");
|
|
854
854
|
const exp = Traverse.findParent(node, (n) => n.type === AST_NODE_TYPES.ExportDefaultDeclaration);
|
|
855
855
|
const isExportDefault = exp != null;
|
|
856
856
|
const isExportDefaultDeclaration = exp != null && Extract.unwrap(exp.declaration) === node;
|
|
@@ -942,7 +942,7 @@ function getHookCollector(context) {
|
|
|
942
942
|
const getCurrentEntry = () => functionEntries.at(-1) ?? null;
|
|
943
943
|
const onFunctionEnter = (node) => {
|
|
944
944
|
const id = getFunctionId(node);
|
|
945
|
-
const key =
|
|
945
|
+
const key = randomBytes(8).toString("hex");
|
|
946
946
|
const entry = {
|
|
947
947
|
id,
|
|
948
948
|
key,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "5.2.4-next.
|
|
3
|
+
"version": "5.2.4-next.2",
|
|
4
4
|
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -34,16 +34,15 @@
|
|
|
34
34
|
"@typescript-eslint/types": "^8.58.2",
|
|
35
35
|
"@typescript-eslint/utils": "^8.58.2",
|
|
36
36
|
"ts-pattern": "^5.9.0",
|
|
37
|
-
"
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/
|
|
41
|
-
"@eslint-react/
|
|
42
|
-
"@eslint-react/var": "5.2.4-next.0"
|
|
37
|
+
"@eslint-react/ast": "5.2.4-next.2",
|
|
38
|
+
"@eslint-react/eslint": "5.2.4-next.2",
|
|
39
|
+
"@eslint-react/jsx": "5.2.4-next.2",
|
|
40
|
+
"@eslint-react/shared": "5.2.4-next.2",
|
|
41
|
+
"@eslint-react/var": "5.2.4-next.2"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@typescript-eslint/typescript-estree": "^8.58.2",
|
|
46
|
-
"tsdown": "^0.21.
|
|
45
|
+
"tsdown": "^0.21.9",
|
|
47
46
|
"@local/configs": "0.0.0",
|
|
48
47
|
"@local/eff": "3.0.0-beta.72"
|
|
49
48
|
},
|