@tony.ganchev/eslint-plugin-header 3.1.7 → 3.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -446,6 +446,17 @@ module.exports = {
446
446
  });
447
447
  return;
448
448
  }
449
+ if (headerLines.length === 1) {
450
+ const leadingCommentValues = leadingComments.map((c) => c.value);
451
+ if (!match(leadingCommentValues.join("\n"), headerLines[0]) && !match(leadingCommentValues.join("\r\n"), headerLines[0])) {
452
+ context.report({
453
+ loc: node.loc,
454
+ message: "incorrect header",
455
+ fix: canFix ? genReplaceFixer(commentType, context, leadingComments, fixLines, eol, numNewlines) : null
456
+ });
457
+ }
458
+ return;
459
+ }
449
460
  for (var i = 0; i < headerLines.length; i++) {
450
461
  if (!match(leadingComments[i].value, headerLines[i])) {
451
462
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tony.ganchev/eslint-plugin-header",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "description": "ESLint plugin to ensure files begin with a given comment, usually a copyright or license notice.",
5
5
  "main": "index.js",
6
6
  "files": [