From 5d5571875c3dcba16007330fff8e35d8a21e38b0 Mon Sep 17 00:00:00 2001 From: Eliott Vincent Date: Tue, 9 Jan 2024 21:32:04 +0100 Subject: [PATCH] v1.0.66 Stricter header check --- package-lock.json | 4 ++-- package.json | 2 +- rules/vue-header-check.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54708c1..2f2cabf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "eslint-plugin-crisp", - "version": "1.0.65", + "version": "1.0.66", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "eslint-plugin-crisp", - "version": "1.0.65", + "version": "1.0.66", "license": "MIT", "dependencies": { "doctrine": "3.0.0", diff --git a/package.json b/package.json index 83026ff..b148676 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/rules/vue-header-check.js b/rules/vue-header-check.js index d42e568..8bb7b8d 100644 --- a/rules/vue-header-check.js +++ b/rules/vue-header-check.js @@ -31,7 +31,7 @@ module.exports = { // Check each tag individually vueTags.forEach((tag, index) => { const tagRegExp = new RegExp(`<${tag}`); - const headerRegExp = new RegExp(`\\s*\\n\\s*<${tag}`); + const headerRegExp = new RegExp(`\\n\\n\\s*\\n\\n<${tag}`); // If the tag exists without the corresponding header, report an error if (tagRegExp.test(fileContent) && !headerRegExp.test(fileContent)) {