From dbdb3c66a38b02131622a141262de5f8f07ab57b Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 2 Mar 2025 18:50:34 +0100 Subject: [PATCH] Set up my own eslint rules --- showbits-thermal-printer-ui/eslint.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/showbits-thermal-printer-ui/eslint.config.js b/showbits-thermal-printer-ui/eslint.config.js index 5b85f1e..57af2da 100644 --- a/showbits-thermal-printer-ui/eslint.config.js +++ b/showbits-thermal-printer-ui/eslint.config.js @@ -20,4 +20,21 @@ export default tseslint.config( files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } }, }, + + { + rules: { + // https://eslint.org/docs/latest/rules/ + eqeqeq: "error", + + // https://typescript-eslint.io/rules/ + "@typescript-eslint/explicit-function-return-type": "error", + + // https://eslint.vuejs.org/rules/ + "vue/block-lang": ["error", { script: { lang: "ts" } }], + "vue/block-order": ["error", { order: ["script", "template", "style"] }], + "vue/component-api-style": ["error", ["script-setup"]], + "vue/eqeqeq": "error", + "vue/v-for-delimiter-style": ["error", "of"], + }, + }, );