eslint-plugin-react-debug 5.28.0 → 5.28.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -11
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -24,18 +24,13 @@ var __exportAll = (all, no_symbols) => {
24
24
  //#endregion
25
25
  //#region package.json
26
26
  var name$1 = "eslint-plugin-react-debug";
27
- var version = "5.28.0";
27
+ var version = "5.28.1";
28
28
  //#endregion
29
29
  //#region src/utils/create-rule.ts
30
30
  function getDocsUrl(ruleName) {
31
31
  return `https://eslint-react.xyz/docs/rules/debug-${ruleName}`;
32
32
  }
33
33
  const createRule = ESLintUtils.RuleCreator(getDocsUrl);
34
- //#endregion
35
- //#region src/utils/stringify.ts
36
- function stringify(value) {
37
- return JSON.stringify(value, null, 2);
38
- }
39
34
  var function_component_default = createRule({
40
35
  meta: {
41
36
  type: "problem",
@@ -53,7 +48,7 @@ function create$4(context) {
53
48
  });
54
49
  return merge(visitor, { "Program:exit"(program) {
55
50
  for (const { name, displayName, flag, hookCalls, node } of api.getAllComponents(program)) context.report({
56
- data: { json: stringify({
51
+ data: { json: JSON.stringify({
57
52
  name: name ?? "anonymous",
58
53
  displayName: displayName == null ? "none" : context.sourceCode.getText(displayName),
59
54
  forwardRef: (flag & core.FunctionComponentFlag.ForwardRef) > 0n,
@@ -79,7 +74,7 @@ function create$3(context) {
79
74
  const { api, visitor } = core.getHookCollector(context);
80
75
  return merge(visitor, { "Program:exit"(program) {
81
76
  for (const { name, hookCalls, node } of api.getAllHooks(program)) context.report({
82
- data: { json: stringify({
77
+ data: { json: JSON.stringify({
83
78
  name,
84
79
  hookCalls: hookCalls.length
85
80
  }) },
@@ -115,7 +110,7 @@ function create$2(context) {
115
110
  const name = node.name;
116
111
  if (!isFromReact(node, context.sourceCode.getScope(node), importSource)) return;
117
112
  context.report({
118
- data: { json: stringify({
113
+ data: { json: JSON.stringify({
119
114
  name,
120
115
  importSource
121
116
  }) },
@@ -166,7 +161,7 @@ function create$1(context) {
166
161
  const refInit = getRefInitNode(context, node, context.sourceCode.getScope(node));
167
162
  if (refInit == null) return;
168
163
  context.report({
169
- data: { json: stringify({
164
+ data: { json: JSON.stringify({
170
165
  name: node.name,
171
166
  init: context.sourceCode.getText(refInit)
172
167
  }) },
@@ -193,7 +188,7 @@ function create(context) {
193
188
  const jsxConfig = core.getJsxConfig(context);
194
189
  function visit(node) {
195
190
  context.report({
196
- data: { json: stringify({
191
+ data: { json: JSON.stringify({
197
192
  kind: match(node).with({ type: AST_NODE_TYPES.JSXElement }, (n) => isFragmentElement(n, jsxConfig.jsxFragmentFactory) ? "fragment" : "element").with({ type: AST_NODE_TYPES.JSXFragment }, () => "fragment").exhaustive(),
198
193
  type: getElementFullType(node),
199
194
  jsx: match(jsxConfig.jsx).with(ts.JsxEmit.None, () => "none").with(ts.JsxEmit.ReactJSX, () => "react-jsx").with(ts.JsxEmit.ReactJSXDev, () => "react-jsx-dev").with(ts.JsxEmit.React, () => "react").with(ts.JsxEmit.ReactNative, () => "react-native").with(ts.JsxEmit.Preserve, () => "preserve").otherwise(() => "unknown"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "5.28.0",
3
+ "version": "5.28.1",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -37,12 +37,12 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@eslint-react/ast": "5.28.0",
41
- "@eslint-react/core": "5.28.0",
42
- "@eslint-react/eslint": "5.28.0",
43
- "@eslint-react/jsx": "5.28.0",
44
- "@eslint-react/shared": "5.28.0",
45
- "@eslint-react/var": "5.28.0",
40
+ "@eslint-react/ast": "5.28.1",
41
+ "@eslint-react/core": "5.28.1",
42
+ "@eslint-react/eslint": "5.28.1",
43
+ "@eslint-react/jsx": "5.28.1",
44
+ "@eslint-react/shared": "5.28.1",
45
+ "@eslint-react/var": "5.28.1",
46
46
  "@typescript-eslint/scope-manager": "^8.71.2",
47
47
  "@typescript-eslint/types": "^8.71.2",
48
48
  "@typescript-eslint/utils": "^8.71.2",
@@ -56,7 +56,7 @@
56
56
  "@types/react": "^19.3.0",
57
57
  "@types/react-dom": "^19.3.0",
58
58
  "dedent": "^1.7.2",
59
- "eslint": "^10.12.0",
59
+ "eslint": "^10.13.0",
60
60
  "tsdown": "^0.23.1",
61
61
  "typescript": "6.0.3"
62
62
  },