@@ -354,7 +354,7 @@ const create = context => {
354
354
if ( dates . length > 1 ) {
355
355
uses ++ ;
356
356
context . report ( {
357
- loc : comment . loc ,
357
+ loc : sourceCode . getLoc ( comment ) ,
358
358
messageId : MESSAGE_ID_AVOID_MULTIPLE_DATES ,
359
359
data : {
360
360
expirationDates : dates . join ( ', ' ) ,
@@ -368,7 +368,7 @@ const create = context => {
368
368
const shouldIgnore = options . ignoreDatesOnPullRequests && ci . isPR ;
369
369
if ( ! shouldIgnore && reachedDate ( expirationDate , options . date ) ) {
370
370
context . report ( {
371
- loc : comment . loc ,
371
+ loc : sourceCode . getLoc ( comment ) ,
372
372
messageId : MESSAGE_ID_EXPIRED_TODO ,
373
373
data : {
374
374
expirationDate,
@@ -381,7 +381,7 @@ const create = context => {
381
381
if ( packageVersions . length > 1 ) {
382
382
uses ++ ;
383
383
context . report ( {
384
- loc : comment . loc ,
384
+ loc : sourceCode . getLoc ( comment ) ,
385
385
messageId : MESSAGE_ID_AVOID_MULTIPLE_PACKAGE_VERSIONS ,
386
386
data : {
387
387
versions : packageVersions
@@ -400,7 +400,7 @@ const create = context => {
400
400
const compare = semverComparisonForOperator ( condition ) ;
401
401
if ( packageVersion && compare ( packageVersion , decidedPackageVersion ) ) {
402
402
context . report ( {
403
- loc : comment . loc ,
403
+ loc : sourceCode . getLoc ( comment ) ,
404
404
messageId : MESSAGE_ID_REACHED_PACKAGE_VERSION ,
405
405
data : {
406
406
comparison : `${ condition } ${ version } ` ,
@@ -426,7 +426,7 @@ const create = context => {
426
426
427
427
if ( trigger ) {
428
428
context . report ( {
429
- loc : comment . loc ,
429
+ loc : sourceCode . getLoc ( comment ) ,
430
430
messageId,
431
431
data : {
432
432
package : dependency . name ,
@@ -452,7 +452,7 @@ const create = context => {
452
452
453
453
if ( compare ( targetPackageVersion , todoVersion ) ) {
454
454
context . report ( {
455
- loc : comment . loc ,
455
+ loc : sourceCode . getLoc ( comment ) ,
456
456
messageId : MESSAGE_ID_VERSION_MATCHES ,
457
457
data : {
458
458
comparison : `${ dependency . name } ${ dependency . condition } ${ dependency . version } ` ,
@@ -484,7 +484,7 @@ const create = context => {
484
484
485
485
if ( compare ( targetPackageEngineVersion , todoEngine ) ) {
486
486
context . report ( {
487
- loc : comment . loc ,
487
+ loc : sourceCode . getLoc ( comment ) ,
488
488
messageId : MESSAGE_ID_ENGINE_MATCHES ,
489
489
data : {
490
490
comparison : `node${ engine . condition } ${ engine . version } ` ,
@@ -508,7 +508,7 @@ const create = context => {
508
508
if ( parseArgument ( testString ) . type !== 'unknowns' ) {
509
509
uses ++ ;
510
510
context . report ( {
511
- loc : comment . loc ,
511
+ loc : sourceCode . getLoc ( comment ) ,
512
512
messageId : MESSAGE_ID_MISSING_AT_SYMBOL ,
513
513
data : {
514
514
original : unknown ,
@@ -525,7 +525,7 @@ const create = context => {
525
525
if ( parseArgument ( withoutWhitespace ) . type !== 'unknowns' ) {
526
526
uses ++ ;
527
527
context . report ( {
528
- loc : comment . loc ,
528
+ loc : sourceCode . getLoc ( comment ) ,
529
529
messageId : MESSAGE_ID_REMOVE_WHITESPACE ,
530
530
data : {
531
531
original : unknown ,
0 commit comments