eslint-plugin-react-debug
Advanced tools
+6
-10
| import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, defineRuleListener, getSettingsFromContext, report } from "@eslint-react/shared"; | ||
| import * as core from "@eslint-react/core"; | ||
| import { JsxEmit, JsxInspector } from "@eslint-react/core"; | ||
| import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils"; | ||
@@ -27,3 +28,3 @@ import { flow } from "@eslint-react/eff"; | ||
| var name$1 = "eslint-plugin-react-debug"; | ||
| var version = "3.0.0-next.69"; | ||
| var version = "3.0.0-next.70"; | ||
@@ -225,3 +226,2 @@ //#endregion | ||
| //#region src/rules/jsx/jsx.ts | ||
| const { JsxEmit } = core; | ||
| const RULE_NAME = "jsx"; | ||
@@ -240,13 +240,9 @@ var jsx_default = createRule({ | ||
| function create(context) { | ||
| const jsxConfigFromContext = core.getJsxConfigFromContext(context); | ||
| const jsxConfigFromAnnotation = core.getJsxConfigFromAnnotation(context); | ||
| const jsxConfig = { | ||
| ...jsxConfigFromContext, | ||
| ...jsxConfigFromAnnotation | ||
| }; | ||
| const jsx = JsxInspector.from(context); | ||
| const jsxConfig = jsx.jsxConfig; | ||
| function getReportDescriptor(context) { | ||
| return (node) => ({ | ||
| data: { json: stringify({ | ||
| 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(), | ||
| type: core.getJsxElementType(context, node), | ||
| 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(), | ||
| type: jsx.getElementType(node), | ||
| 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"), | ||
@@ -253,0 +249,0 @@ jsxFactory: jsxConfig.jsxFactory, |
+6
-6
| { | ||
| "name": "eslint-plugin-react-debug", | ||
| "version": "3.0.0-next.69", | ||
| "version": "3.0.0-next.70", | ||
| "description": "ESLint React's ESLint plugin for debugging related rules.", | ||
@@ -46,7 +46,7 @@ "keywords": [ | ||
| "ts-pattern": "^5.9.0", | ||
| "@eslint-react/ast": "3.0.0-next.69", | ||
| "@eslint-react/core": "3.0.0-next.69", | ||
| "@eslint-react/eff": "3.0.0-next.69", | ||
| "@eslint-react/shared": "3.0.0-next.69", | ||
| "@eslint-react/var": "3.0.0-next.69" | ||
| "@eslint-react/ast": "3.0.0-next.70", | ||
| "@eslint-react/core": "3.0.0-next.70", | ||
| "@eslint-react/eff": "3.0.0-next.70", | ||
| "@eslint-react/shared": "3.0.0-next.70", | ||
| "@eslint-react/var": "3.0.0-next.70" | ||
| }, | ||
@@ -53,0 +53,0 @@ "devDependencies": { |
13720
-1.1%296
-1.33%+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed