From 3b8a8fe36ac0770cbb4fda1f7be6c6e225d9f528 Mon Sep 17 00:00:00 2001 From: Sabir el Yahiaoui Date: Thu, 1 Feb 2024 13:19:39 +0100 Subject: [PATCH] re-add vue3 tag order rule --- configs/javascript.js | 3 ++- configs/vue2.js | 2 +- configs/vue3.js | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configs/javascript.js b/configs/javascript.js index 153c1a9..1e69c62 100644 --- a/configs/javascript.js +++ b/configs/javascript.js @@ -1,7 +1,8 @@ /** * The configuration for basic JS files without the use of a framework. * Just has the recommended eslint and prettier rules - * */ + **/ + module.exports = { env: { browser: true, diff --git a/configs/vue2.js b/configs/vue2.js index e1b20f0..40f3792 100644 --- a/configs/vue2.js +++ b/configs/vue2.js @@ -7,7 +7,7 @@ module.exports = { // Standard JS rules 'eslint:recommended', 'prettier', - + // Vue2 rules 'plugin:vue/recommended', 'plugin:vuejs-accessibility/recommended', diff --git a/configs/vue3.js b/configs/vue3.js index 2208a99..1de6de4 100644 --- a/configs/vue3.js +++ b/configs/vue3.js @@ -14,7 +14,7 @@ module.exports = { 'plugin:@typescript-eslint/recommended', ], parser: 'vue-eslint-parser', - + // TS parser settings parserOptions: { parser: '@typescript-eslint/parser', @@ -40,5 +40,11 @@ module.exports = { 'vue/html-closing-bracket-spacing': 'error', 'vue/no-empty-component-block': 'error', 'vue/html-button-has-type': 'warn', + 'vue/component-tags-order': [ + 'error', + { + order: ['script', 'template', 'style'], + }, + ], }, }