Skip to content

Commit

Permalink
test: verify (broken) vue processing
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Mar 25, 2024
1 parent 0de7679 commit 419e380
Show file tree
Hide file tree
Showing 6 changed files with 444 additions and 42 deletions.
10 changes: 10 additions & 0 deletions lib/rules/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,18 @@ module.exports = {
return {
Program: function(programNode) {

// ignore Vue SFC
if (programNode.templateBody) {
return;
}

const firstStatement = programNode.body[0];

// ignore Svelte SFC
if (/^Svelte*/.test(firstStatement.type)) {
return;
}

const comments = getLeadingComments(firstStatement || programNode);

const licenseNode = findLicenseComment(comments);
Expand Down
Loading

0 comments on commit 419e380

Please sign in to comment.