Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (dates.length > 1) {
uses++;
context.report({
node: null,
loc: comment.loc,
messageId: MESSAGE_ID_AVOID_MULTIPLE_DATES,
data: {
expirationDates: dates.join(', '),
message: parseTodoMessage(comment.value)
}
});
} else if (dates.length === 1) {
uses++;
const [date] = dates;
const shouldIgnore = options.ignoreDatesOnPullRequests && ci.isPR;
if (!shouldIgnore && reachedDate(date)) {
context.report({
node: null,
loc: comment.loc,
messageId: MESSAGE_ID_EXPIRED_TODO,
data: {
expirationDate: date,
message: parseTodoMessage(comment.value)
}
});
}
}
if (packageVersions.length > 1) {
uses++;
context.report({