File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -5583,7 +5583,7 @@ function getCommentsFromSource(source) {
55835583 parse ( source , {
55845584 onComment : comments ,
55855585 sourceType : 'module' ,
5586- ecmaVersion : 2020 ,
5586+ ecmaVersion : 2022 ,
55875587 } ) ;
55885588 return comments ;
55895589}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function getCommentsFromSource(source: string) {
2424 parse ( source , {
2525 onComment : comments ,
2626 sourceType : 'module' ,
27- ecmaVersion : 2020 ,
27+ ecmaVersion : 2022 ,
2828 } ) ;
2929
3030 return comments ;
Original file line number Diff line number Diff line change @@ -42,4 +42,12 @@ describe('getStimulusCommentOptions', () => {
4242 errors : [ ] ,
4343 } ) ;
4444 } ) ;
45+
46+ it ( 'parses source with static properties' , ( ) => {
47+ const src = '/* stimulusFetch: "lazy" */ export default class extends Controller { static targets = []; }' ;
48+ expect ( getStimulusCommentOptions ( src ) ) . toEqual ( {
49+ options : { stimulusFetch : 'lazy' } ,
50+ errors : [ ] ,
51+ } ) ;
52+ } ) ;
4553} ) ;
You can’t perform that action at this time.
0 commit comments