From 096f1fe0e9caad720fd03eb6a8ffec34da9c1fc9 Mon Sep 17 00:00:00 2001 From: jiangx <1457960500@qq.com> Date: Thu, 20 Apr 2023 13:31:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A8=20add=20eslint=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 973909b..c23e448 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,27 @@ module.exports = { plugins: ['vue', '@typescript-eslint', 'prettier'], rules: { 'no-undef': 'off', + 'vue/attributes-order': [ + 'error', + { + order: [ + 'DEFINITION', + 'LIST_RENDERING', + 'CONDITIONALS', + 'RENDER_MODIFIERS', + 'GLOBAL', + ['UNIQUE', 'SLOT'], + 'TWO_WAY_BINDING', + 'OTHER_DIRECTIVES', + 'OTHER_ATTR', + 'EVENTS', + 'CONTENT' + ], + alphabetical: false + } + ], + 'vue/no-watch-after-await': 'error', + 'vue/attribute-hyphenation': ['error', 'always'], 'vue/multi-word-component-names': 'off', '@typescript-eslint/ban-ts-ignore': 'off', '@typescript-eslint/no-unused-vars': 'warn',