eslint-plugin-header
eslint-plugin-header copied to clipboard
Prevent it from eating existing header comments
Let's say I have a file with an existing comment:
// log 1
console.log(1);
Is there a way I can prevent eslint-plugin-header from removing the existing comment, and prepend the header template instead?
I would say this should have been the default - if the leading comment does not match the expected header, then no header is present and the auto-fix prepends the header before the first comment.
We can further add error reporting to explain that the first header did not match the expected header.
I've forked the plugin for a year and I'll track the proposed improvement under https://github.com/tonyganchev/eslint-plugin-header/issues/63