File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
test/fixtures/basic_custom_plugin/test_plugin Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class Linter {
8787
8888 const rules = [ ] ;
8989 for ( const { rule, ruleId } of this . pluginRegistry . getRules ( ruleIds ) ) {
90- rules . push ( rule ( createContext ( ruleId ) ) ) ;
90+ rules . push ( rule . create ( createContext ( ruleId ) ) ) ;
9191 }
9292
9393 // TODO: walk the AST
Original file line number Diff line number Diff line change @@ -3,15 +3,17 @@ export default {
33 name : "basic-custom-plugin" ,
44 } ,
55 rules : {
6- "no-debugger" : ( context ) => {
7- // TODO: move this call into `DebuggerStatement`, once we are walking the ast.
8- context . report ( {
9- message : "Unexpected Debugger Statement" ,
10- node : { start : 0 , end : 0 } ,
11- } ) ;
12- return {
13- DebuggerStatement ( _debuggerStatement ) { } ,
14- } ;
6+ "no-debugger" : {
7+ create ( context ) {
8+ // TODO: move this call into `DebuggerStatement`, once we are walking the ast.
9+ context . report ( {
10+ message : "Unexpected Debugger Statement" ,
11+ node : { start : 0 , end : 0 } ,
12+ } ) ;
13+ return {
14+ DebuggerStatement ( _debuggerStatement ) { } ,
15+ } ;
16+ } ,
1517 } ,
1618 } ,
1719} ;
You can’t perform that action at this time.
0 commit comments