eslint-plugin-header
eslint-plugin-header copied to clipboard
Add optional patterns
As far as I can tell there is not a way to have an optional pattern.
This would be nice for matching pragmas that may not be in every file.
I would classify this as an ESLint issue. Sometimes you want some ESLint rules applied to some files, but not others, it doesn't only apply to eslint-plugin-header.
Never mind, I think I misread the issue.
Here's an example where this would be useful.
On this project, we need the licence header to be present at all times, but the //@flow directive is optional.
(In this case one's a block comment and one's a line comment, but that's another issue.)
Did this ever happen? I would really like to be able to make some header lines optional but I don't see a way to do that.