eslint-plugin-react-debug 5.1.0-next.0 → 5.1.0-next.1
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 -7
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_ESLINT_REACT_SETTINGS,
|
|
1
|
+
import { DEFAULT_ESLINT_REACT_SETTINGS, getSettingsFromContext } from "@eslint-react/shared";
|
|
2
2
|
import * as core from "@eslint-react/core";
|
|
3
3
|
import { isUseRefCall } from "@eslint-react/core";
|
|
4
|
+
import { merge } from "@eslint-react/eslint";
|
|
4
5
|
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
5
6
|
import { findVariable } from "@typescript-eslint/utils/ast-utils";
|
|
6
7
|
import "@eslint-react/ast";
|
|
@@ -27,7 +28,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region package.json
|
|
29
30
|
var name$1 = "eslint-plugin-react-debug";
|
|
30
|
-
var version = "5.1.0-next.
|
|
31
|
+
var version = "5.1.0-next.1";
|
|
31
32
|
|
|
32
33
|
//#endregion
|
|
33
34
|
//#region src/utils/create-rule.ts
|
|
@@ -61,7 +62,7 @@ function create$4(context) {
|
|
|
61
62
|
collectDisplayName: true,
|
|
62
63
|
hint: core.DEFAULT_COMPONENT_DETECTION_HINT
|
|
63
64
|
});
|
|
64
|
-
return
|
|
65
|
+
return merge(visitor, { "Program:exit"(program) {
|
|
65
66
|
for (const { name, displayName, flag, hookCalls, node } of api.getAllComponents(program)) context.report({
|
|
66
67
|
data: { json: stringify({
|
|
67
68
|
name: name ?? "anonymous",
|
|
@@ -92,7 +93,7 @@ var hook_default = createRule({
|
|
|
92
93
|
});
|
|
93
94
|
function create$3(context) {
|
|
94
95
|
const { api, visitor } = core.getHookCollector(context);
|
|
95
|
-
return
|
|
96
|
+
return merge(visitor, { "Program:exit"(program) {
|
|
96
97
|
for (const { name, hookCalls, node } of api.getAllHooks(program)) context.report({
|
|
97
98
|
data: { json: stringify({
|
|
98
99
|
name,
|
|
@@ -133,7 +134,7 @@ function create$2(context) {
|
|
|
133
134
|
node
|
|
134
135
|
});
|
|
135
136
|
}
|
|
136
|
-
return
|
|
137
|
+
return merge({
|
|
137
138
|
Identifier: visitorFunction,
|
|
138
139
|
JSXIdentifier: visitorFunction
|
|
139
140
|
});
|
|
@@ -183,7 +184,7 @@ function create$1(context) {
|
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
|
-
return
|
|
187
|
+
return merge({
|
|
187
188
|
Identifier: visitorFunction,
|
|
188
189
|
JSXIdentifier: visitorFunction
|
|
189
190
|
});
|
|
@@ -408,7 +409,7 @@ function create(context) {
|
|
|
408
409
|
node
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
|
-
return
|
|
412
|
+
return merge({ "JSXElement, JSXFragment": flow(getReportDescriptor(context), report(context)) });
|
|
412
413
|
}
|
|
413
414
|
|
|
414
415
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.1",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,11 +43,12 @@
|
|
|
43
43
|
"@typescript-eslint/types": "^8.58.1",
|
|
44
44
|
"@typescript-eslint/utils": "^8.58.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "5.1.0-next.
|
|
47
|
-
"@eslint-react/core": "5.1.0-next.
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
46
|
+
"@eslint-react/ast": "5.1.0-next.1",
|
|
47
|
+
"@eslint-react/core": "5.1.0-next.1",
|
|
48
|
+
"@eslint-react/shared": "5.1.0-next.1",
|
|
49
|
+
"@eslint-react/jsx": "5.1.0-next.1",
|
|
50
|
+
"@eslint-react/eslint": "5.1.0-next.1",
|
|
51
|
+
"@eslint-react/var": "5.1.0-next.1"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@types/react": "^19.2.14",
|