eslint-plugin-react-debug 3.0.0-next.69 → 3.0.0-next.70

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 -10
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, defineRuleListener, getSettingsFromContext, report } from "@eslint-react/shared";
2
2
  import * as core from "@eslint-react/core";
3
+ import { JsxEmit, JsxInspector } from "@eslint-react/core";
3
4
  import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
4
5
  import { flow } from "@eslint-react/eff";
5
6
  import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/types";
@@ -24,7 +25,7 @@ var __exportAll = (all, no_symbols) => {
24
25
  //#endregion
25
26
  //#region package.json
26
27
  var name$1 = "eslint-plugin-react-debug";
27
- var version = "3.0.0-next.69";
28
+ var version = "3.0.0-next.70";
28
29
 
29
30
  //#endregion
30
31
  //#region src/utils/create-rule.ts
@@ -221,7 +222,6 @@ function getRefInitNode(node, initialScope) {
221
222
 
222
223
  //#endregion
223
224
  //#region src/rules/jsx/jsx.ts
224
- const { JsxEmit } = core;
225
225
  const RULE_NAME = "jsx";
226
226
  var jsx_default = createRule({
227
227
  meta: {
@@ -235,17 +235,13 @@ var jsx_default = createRule({
235
235
  defaultOptions: []
236
236
  });
237
237
  function create(context) {
238
- const jsxConfigFromContext = core.getJsxConfigFromContext(context);
239
- const jsxConfigFromAnnotation = core.getJsxConfigFromAnnotation(context);
240
- const jsxConfig = {
241
- ...jsxConfigFromContext,
242
- ...jsxConfigFromAnnotation
243
- };
238
+ const jsx = JsxInspector.from(context);
239
+ const jsxConfig = jsx.jsxConfig;
244
240
  function getReportDescriptor(context) {
245
241
  return (node) => ({
246
242
  data: { json: stringify({
247
- kind: match(node).with({ type: AST_NODE_TYPES$1.JSXElement }, (n) => core.isJsxFragmentElement(context, n, jsxConfig) ? "fragment" : "element").with({ type: AST_NODE_TYPES$1.JSXFragment }, () => "fragment").exhaustive(),
248
- type: core.getJsxElementType(context, node),
243
+ kind: match(node).with({ type: AST_NODE_TYPES$1.JSXElement }, (n) => jsx.isFragmentElement(n) ? "fragment" : "element").with({ type: AST_NODE_TYPES$1.JSXFragment }, () => "fragment").exhaustive(),
244
+ type: jsx.getElementType(node),
249
245
  jsx: match(jsxConfig.jsx).with(JsxEmit.None, () => "none").with(JsxEmit.ReactJSX, () => "react-jsx").with(JsxEmit.ReactJSXDev, () => "react-jsx-dev").with(JsxEmit.React, () => "react").with(JsxEmit.ReactNative, () => "react-native").with(JsxEmit.Preserve, () => "preserve").otherwise(() => "unknown"),
250
246
  jsxFactory: jsxConfig.jsxFactory,
251
247
  jsxFragmentFactory: jsxConfig.jsxFragmentFactory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "3.0.0-next.69",
3
+ "version": "3.0.0-next.70",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -43,11 +43,11 @@
43
43
  "@typescript-eslint/types": "canary",
44
44
  "@typescript-eslint/utils": "canary",
45
45
  "ts-pattern": "^5.9.0",
46
- "@eslint-react/ast": "3.0.0-next.69",
47
- "@eslint-react/core": "3.0.0-next.69",
48
- "@eslint-react/eff": "3.0.0-next.69",
49
- "@eslint-react/shared": "3.0.0-next.69",
50
- "@eslint-react/var": "3.0.0-next.69"
46
+ "@eslint-react/ast": "3.0.0-next.70",
47
+ "@eslint-react/core": "3.0.0-next.70",
48
+ "@eslint-react/eff": "3.0.0-next.70",
49
+ "@eslint-react/shared": "3.0.0-next.70",
50
+ "@eslint-react/var": "3.0.0-next.70"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "^19.2.14",