File tree Expand file tree Collapse file tree
plugins/eslint-plugin-react-debug/src/rules/jsx Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,11 +4,9 @@ import type { TSESTreeJSXElementLike } from "@eslint-react/ast";
44import * as core from "@eslint-react/core" ;
55import { type RuleContext , type RuleFeature , type RuleListener } from "@eslint-react/eslint" ;
66import { getElementFullType , isFragmentElement } from "@eslint-react/jsx" ;
7- import { flow } from "@local/eff" ;
87import { AST_NODE_TYPES as AST } from "@typescript-eslint/types" ;
98import { P , match } from "ts-pattern" ;
109import ts from "typescript" ;
11- import { report } from "./lib" ;
1210
1311export const RULE_NAME = "jsx" ;
1412
@@ -36,9 +34,8 @@ export default createRule<[], MessageID>({
3634
3735export function create ( context : RuleContext < MessageID , [ ] > ) : RuleListener {
3836 const jsxConfig = core . getJsxConfig ( context ) ;
39-
4037 function visit ( node : TSESTreeJSXElementLike ) {
41- return {
38+ context . report ( {
4239 data : {
4340 json : stringify ( {
4441 kind : match ( node )
@@ -64,9 +61,7 @@ export function create(context: RuleContext<MessageID, []>): RuleListener {
6461 } ,
6562 messageId : "default" ,
6663 node,
67- } as const ;
64+ } ) ;
6865 }
69- return {
70- "JSXElement, JSXFragment" : flow ( visit , report ( context ) ) ,
71- } ;
66+ return { JSXElement : visit , JSXFragment : visit } ;
7267}
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments