eslint-plugin-react-debug 5.6.2 → 5.6.3-beta.0
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 +6 -5
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -5,8 +5,9 @@ import { isUseRefCall } from "@eslint-react/core";
|
|
|
5
5
|
import { merge } from "@eslint-react/eslint";
|
|
6
6
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
7
7
|
import { findVariable } from "@typescript-eslint/utils/ast-utils";
|
|
8
|
-
import {
|
|
8
|
+
import { getElementFullType, isFragmentElement } from "@eslint-react/jsx";
|
|
9
9
|
import { P, match } from "ts-pattern";
|
|
10
|
+
import ts from "typescript";
|
|
10
11
|
|
|
11
12
|
//#region \0rolldown/runtime.js
|
|
12
13
|
var __defProp = Object.defineProperty;
|
|
@@ -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.6.
|
|
31
|
+
var version = "5.6.3-beta.0";
|
|
31
32
|
|
|
32
33
|
//#endregion
|
|
33
34
|
//#region src/utils/create-rule.ts
|
|
@@ -398,17 +399,17 @@ var jsx_default = createRule({
|
|
|
398
399
|
defaultOptions: []
|
|
399
400
|
});
|
|
400
401
|
function create(context) {
|
|
401
|
-
const jsxConfig = getJsxConfig(context);
|
|
402
|
+
const jsxConfig = core.getJsxConfig(context);
|
|
402
403
|
function getReportDescriptor(_) {
|
|
403
404
|
return (node) => ({
|
|
404
405
|
data: { json: stringify({
|
|
405
406
|
kind: match(node).with({ type: AST_NODE_TYPES.JSXElement }, (n) => isFragmentElement(n, jsxConfig.jsxFragmentFactory) ? "fragment" : "element").with({ type: AST_NODE_TYPES.JSXFragment }, () => "fragment").exhaustive(),
|
|
406
407
|
type: getElementFullType(node),
|
|
407
|
-
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"),
|
|
408
|
+
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"),
|
|
408
409
|
jsxFactory: jsxConfig.jsxFactory,
|
|
409
410
|
jsxFragmentFactory: jsxConfig.jsxFragmentFactory,
|
|
410
411
|
jsxImportSource: jsxConfig.jsxImportSource,
|
|
411
|
-
jsxRuntime: match(jsxConfig.jsx).with(P.union(JsxEmit.None, JsxEmit.ReactJSX, JsxEmit.ReactJSXDev), () => "automatic").otherwise(() => "classic")
|
|
412
|
+
jsxRuntime: match(jsxConfig.jsx).with(P.union(ts.JsxEmit.None, ts.JsxEmit.ReactJSX, ts.JsxEmit.ReactJSXDev), () => "automatic").otherwise(() => "classic")
|
|
412
413
|
}) },
|
|
413
414
|
messageId: "default",
|
|
414
415
|
node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.3-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@typescript-eslint/types": "^8.59.1",
|
|
42
42
|
"@typescript-eslint/utils": "^8.59.1",
|
|
43
43
|
"ts-pattern": "^5.9.0",
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/shared": "5.6.
|
|
44
|
+
"@eslint-react/core": "5.6.3-beta.0",
|
|
45
|
+
"@eslint-react/ast": "5.6.3-beta.0",
|
|
46
|
+
"@eslint-react/eslint": "5.6.3-beta.0",
|
|
47
|
+
"@eslint-react/jsx": "5.6.3-beta.0",
|
|
48
|
+
"@eslint-react/shared": "5.6.3-beta.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/react": "^19.2.14",
|