File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/plugins/eslint-plugin-react-debug/src/rules Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
import type { RuleListener } from "@typescript-eslint/utils/ts-eslint" ;
2
2
import type { CamelCase } from "string-ts" ;
3
+ import { flow } from "@eslint-react/eff" ;
3
4
import * as JSX from "@eslint-react/jsx" ;
4
- import { JsxConfig , type RuleContext , type RuleFeature } from "@eslint-react/kit" ;
5
+ import { createReport , JsxConfig , type RuleContext , type RuleFeature } from "@eslint-react/kit" ;
5
6
import { AST_NODE_TYPES as T , type TSESTree } from "@typescript-eslint/types" ;
6
7
import { match , P } from "ts-pattern" ;
7
8
import { JsxEmit } from "typescript" ;
@@ -69,11 +70,6 @@ export function create(context: RuleContext<MessageID, []>): RuleListener {
69
70
}
70
71
71
72
return {
72
- JSXElement ( node ) {
73
- context . report ( getReportDescriptor ( node ) ) ;
74
- } ,
75
- JSXFragment ( node ) {
76
- context . report ( getReportDescriptor ( node ) ) ;
77
- } ,
73
+ "JSXElement, JSXFragment" : flow ( getReportDescriptor , createReport ( context ) ) ,
78
74
} ;
79
75
}
You can’t perform that action at this time.
0 commit comments