eslint-plugin-headers
Advanced tools
@@ -200,3 +200,7 @@ /** | ||
node, | ||
appendNewlines(headerFormatter.format(style), eol, 1), | ||
appendNewlines( | ||
headerFormatter.format(style), | ||
eol, | ||
context.options[0]["trailingNewlines"] || 1, | ||
), | ||
); | ||
@@ -203,0 +207,0 @@ }, |
{ | ||
"name": "eslint-plugin-headers", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A flexible and `--fix`able rule for checking, inserting, and formatting file headers.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -249,3 +249,16 @@ /** | ||
}, | ||
{ | ||
options: [ | ||
{ | ||
source: "string", | ||
content: "This is a header with custom trailing newlines.", | ||
trailingNewlines: 2, | ||
}, | ||
], | ||
code: "module.exports = 42;\n", | ||
errors: [{ messageId: "missingHeader" }], | ||
output: | ||
"/**\n * This is a header with custom trailing newlines.\n */\n\nmodule.exports = 42;\n", | ||
}, | ||
], | ||
}); |
43504
1.21%987
1.75%