File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change 11import type { JSONSchema4 } from "json-schema" ;
22import type { Rule } from "eslint" ;
3- import type { AST } from "jsonc-eslint-parser" ;
3+ import type { RuleListener } from "jsonc-eslint-parser" ;
44
5- export type RuleFunction < Node extends AST . JSONNode = never > = (
6- node : Node ,
7- ) => void ;
8-
9- export type BuiltInRuleListeners = {
10- [ Node in AST . JSONNode as Node [ "type" ] ] ?: RuleFunction < Node > ;
11- } ;
12-
13- export type BuiltInRuleListenerExits = {
14- [ Node in AST . JSONNode as `${Node [ "type" ] } :exit`] ?: RuleFunction < Node > ;
15- } ;
16-
17- export interface RuleListener
18- extends BuiltInRuleListeners ,
19- BuiltInRuleListenerExits {
20- [ key : string ] : RuleFunction | undefined ;
21- }
5+ export { RuleListener } ;
226
237export interface RuleModule {
248 meta : RuleMetaData ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function createRule(
2626 } ,
2727 } ,
2828 jsoncDefineRule : rule ,
29- create ( context : Rule . RuleContext ) : any {
29+ create ( context : Rule . RuleContext ) {
3030 const sourceCode = getSourceCode ( context ) ;
3131 if (
3232 typeof sourceCode . parserServices . defineCustomBlocksVisitor ===
You can’t perform that action at this time.
0 commit comments