From 1301908af8e138d6d1495f28d8e385575ee68025 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 16 Mar 2023 12:26:32 -0300 Subject: [PATCH] eslint: Add specific rules for Vue files Mainly change is to allow longer lines in the templates. As we are using in-line CSS with TailwindCSS, this is needed in many cases. --- .eslintrc.cjs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 030663715..060391b7f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -86,10 +86,30 @@ module.exports = { 'vue/valid-v-slot': ['error', { allowModifiers: true }], 'no-await-in-loop': 'off', 'vue/multi-word-component-names': 'off', + 'vue/max-len': [ + 'error', + { + code: 120, + template: 160, + tabWidth: 4, + comments: 160, + ignoreComments: true, + ignoreTrailingComments: true, + ignoreUrls: true, + }, + ], }, settings: { jsdoc: { mode: 'typescript', }, }, + overrides: [ + { + files: ['*.vue'], + rules: { + 'max-len': ['off'], + }, + }, + ], }