-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message #6
Comments
Hey Simon! Yeah, I agree they're a bit generic, mainly because I didn't put in the effort to make them better! One thing that seems ideal would be to use the existing configuration header in the error message, however I'm guessing you're using the regex configuration, which isn't copy and paste-able? The concern I have is that the copyright headers I've seen span many lines, and having a duplicate matcher and ideal copyright header seems redundant, and also including a multi-line header in the ESLint output could be a bit verbose. The examples I've seen so far mainly need a regex to match the year, so I'm now wondering if it would be worth having a "templated" header that allows you to embed What do you think? |
year would be good. Actually, you could have |
Hey Stewart!
It'd be nice to have clearer error messages. Right now "header error" is a bit generic and might be confusing.
We're ready to provide a PR, but I wanted to discuss solutions. Would it make sense to make an
expectedHeader
option to provide an exact expected message value?This would allow to pass filled copyright message that is easy to copy/paste.
I feel an auto-fixer (eg
eslint --fix
) would also require such an option.The text was updated successfully, but these errors were encountered: