This repository was archived by the owner on Mar 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,15 +46,10 @@ module.exports.prototype = {
4646 } ,
4747
4848 check : function ( file , errors ) {
49-
50- var tokens = file . getTokens ( ) ;
51-
5249 file . iterateNodesByType ( [ 'CallExpression' ] , function ( node ) {
53-
5450 node . arguments . forEach ( function ( param , i ) {
55-
56- var punctuatorToken = file . getTokenByRangeStart ( param . range [ 1 ] ) ;
57-
51+ var token = file . getFirstNodeToken ( param ) ;
52+ var punctuatorToken = file . getPrevToken ( token ) ;
5853 if ( punctuatorToken . value === ',' ) {
5954 errors . assert . noWhitespaceBetween ( {
6055 token : punctuatorToken ,
Original file line number Diff line number Diff line change @@ -46,15 +46,9 @@ module.exports.prototype = {
4646 } ,
4747
4848 check : function ( file , errors ) {
49-
50- var tokens = file . getTokens ( ) ;
51-
5249 file . iterateNodesByType ( [ 'CallExpression' ] , function ( node ) {
53-
5450 node . arguments . forEach ( function ( param , i ) {
55-
56- var punctuatorToken = file . getTokenByRangeStart ( param . range [ 1 ] ) ;
57-
51+ var punctuatorToken = file . getPrevToken ( file . getFirstNodeToken ( param ) ) ;
5852 if ( punctuatorToken . value === ',' ) {
5953 errors . assert . whitespaceBetween ( {
6054 token : punctuatorToken ,
You can’t perform that action at this time.
0 commit comments