Skip to content

Commit

Permalink
v1.0.66
Browse files Browse the repository at this point in the history
Stricter header check
  • Loading branch information
eliottvincent committed Jan 9, 2024
1 parent 743401c commit 5d55718
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-crisp",
"version": "1.0.65",
"version": "1.0.66",
"description": "Custom ESLint Rules for Crisp",
"author": "Crisp IM SAS",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion rules/vue-header-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
// Check each tag individually
vueTags.forEach((tag, index) => {
const tagRegExp = new RegExp(`<${tag}`);
const headerRegExp = new RegExp(`<!--\\s*\\*{70,73}\\s*\\n\\s*${headers[index]}\\s*\\n\\s*\\*{70,73}\\s*-->\\s*\\n\\s*<${tag}`);
const headerRegExp = new RegExp(`\\n\\n<!--\\s*\\*{70,73}\\s*\\n\\s{5}${headers[index]}\\s*\\n\\s*\\*{70,73}\\s*-->\\s*\\n\\n<${tag}`);

// If the tag exists without the corresponding header, report an error
if (tagRegExp.test(fileContent) && !headerRegExp.test(fileContent)) {
Expand Down

0 comments on commit 5d55718

Please sign in to comment.