Open rensiu opened 7 years ago
Very good suggestion. I also have the same need to validate copyright headers in vue files and other files such as shell (bash) script files, XML files, etc.
Afraid I don't use Vue, so have some questions:
I'm probably not going to work on this issue, but would accept a PR if it's not too intrusive and much to maintain.
Hi Stuk,
Yes, eslint work with .vue files by using a parser (vue-eslint-parser).
Agreed, it should work, but I noticed that this plugin assumes that first line starts with '/*', and last line ends with '*/'. I think this is a problem in order this plugin to work with comment syntax different to C-like languages. For XML files, this should recognize that the comment start with ''; or no assume anything about how comments start and end.
I will take a look to the code and propose a solution as push request if it helps.
Hi Stuk,
Yes, eslint work with .vue files by using a parser (vue-eslint-parser).
Agreed, it should work, but I noticed that this plugin assumes that first line starts with '/', and last line ends with '/'. I think this is a problem in order this plugin to work with comment syntax different to C-like languages. For XML files, this should recognize that the comment start with ''; or no assume anything about how comments start and end.
I will take a look to the code and propose a solution as push request if it helps.
Any update on this? Facing similar issue as @Stuk. Not working in vue files
Afraid I don't have time to look into this. I would appreciate a PR to fix!
Hi there,
I have a fix that I'm testing locally. I'll make a fork of the project and post up a PR shortly.
There are some caveats with .vue
files which may need more work (such as it crashes if no Githubissues.
It would be nice if this package can support .vue file.
leadingComments[0]
is HTML in .vue file.