eslint-plugin-react-debug 2.0.4 → 2.0.5-next.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 +4 -4
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_ESLINT_REACT_SETTINGS, getConfigAdapters, getDocsUrl, getSettingsFromContext } from "@eslint-react/shared";
|
|
2
|
-
import { ComponentFlag, DEFAULT_COMPONENT_DETECTION_HINT, JsxEmit,
|
|
2
|
+
import { ComponentFlag, DEFAULT_COMPONENT_DETECTION_HINT, JsxEmit, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, isInitializedFromReact, isJsxFragmentElement, useComponentCollector, useComponentCollectorLegacy, useHookCollector } from "@eslint-react/core";
|
|
3
3
|
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
4
4
|
import { flow } from "@eslint-react/eff";
|
|
5
5
|
import { report } from "@eslint-react/kit";
|
|
@@ -37,7 +37,7 @@ const settings = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region package.json
|
|
39
39
|
var name = "eslint-plugin-react-debug";
|
|
40
|
-
var version = "2.0.
|
|
40
|
+
var version = "2.0.5-next.0";
|
|
41
41
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/utils/create-rule.ts
|
|
@@ -246,8 +246,8 @@ function create(context) {
|
|
|
246
246
|
messageId: "jsx",
|
|
247
247
|
node,
|
|
248
248
|
data: { json: stringify({
|
|
249
|
-
kind: match(node).with({ type: AST_NODE_TYPES$1.JSXElement }, (n) =>
|
|
250
|
-
type:
|
|
249
|
+
kind: match(node).with({ type: AST_NODE_TYPES$1.JSXElement }, (n) => isJsxFragmentElement(context$1, n) ? "fragment" : "element").with({ type: AST_NODE_TYPES$1.JSXFragment }, () => "fragment").exhaustive(),
|
|
250
|
+
type: getJsxElementType(context$1, node),
|
|
251
251
|
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"),
|
|
252
252
|
jsxFactory: jsxConfig.jsxFactory,
|
|
253
253
|
jsxFragmentFactory: jsxConfig.jsxFragmentFactory,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-debug",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5-next.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for debugging related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.45.0",
|
|
42
42
|
"string-ts": "^2.2.1",
|
|
43
43
|
"ts-pattern": "^5.8.0",
|
|
44
|
-
"@eslint-react/ast": "2.0.
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/kit": "2.0.
|
|
49
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/ast": "2.0.5-next.0",
|
|
45
|
+
"@eslint-react/core": "2.0.5-next.0",
|
|
46
|
+
"@eslint-react/eff": "2.0.5-next.0",
|
|
47
|
+
"@eslint-react/shared": "2.0.5-next.0",
|
|
48
|
+
"@eslint-react/kit": "2.0.5-next.0",
|
|
49
|
+
"@eslint-react/var": "2.0.5-next.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/react": "^19.1.
|
|
52
|
+
"@types/react": "^19.1.16",
|
|
53
53
|
"@types/react-dom": "^19.1.9",
|
|
54
|
-
"tsdown": "^0.15.
|
|
54
|
+
"tsdown": "^0.15.6",
|
|
55
55
|
"@local/configs": "0.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|