File tree 5 files changed +42
-0
lines changed
tests/specs/lint/lint_plugin_lifecycle
5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "steps" : [
3
+ {
4
+ "args" : " lint a.ts" ,
5
+ "output" : " lint.out"
6
+ }
7
+ ]
8
+ }
Original file line number Diff line number Diff line change
1
+ const _a = "foo" ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "lint" : {
3
+ "plugins" : [" ./plugin.ts" ]
4
+ }
5
+ }
Original file line number Diff line number Diff line change
1
+ create: test-plugin/my-rule
2
+ create: test-plugin/my-rule-2
3
+ destroy: test-plugin/my-rule
4
+ destroy: test-plugin/my-rule-2
5
+ Checked 1 file
Original file line number Diff line number Diff line change
1
+ export default {
2
+ name : "test-plugin" ,
3
+ rules : {
4
+ "my-rule" : {
5
+ create ( ctx ) {
6
+ console . log ( `create: ${ ctx . id } ` ) ;
7
+ return { } ;
8
+ } ,
9
+ destroy ( ctx ) {
10
+ console . log ( `destroy: ${ ctx . id } ` ) ;
11
+ } ,
12
+ } ,
13
+ "my-rule-2" : {
14
+ create ( ctx ) {
15
+ console . log ( `create: ${ ctx . id } ` ) ;
16
+ return { } ;
17
+ } ,
18
+ destroy ( ctx ) {
19
+ console . log ( `destroy: ${ ctx . id } ` ) ;
20
+ } ,
21
+ } ,
22
+ } ,
23
+ } ;
You can’t perform that action at this time.
0 commit comments