Enable and fix custom eslint rules

This commit is contained in:
Joscha 2025-02-10 16:23:14 +01:00
parent ca929a37d1
commit 9f3789e032
8 changed files with 38 additions and 23 deletions

View file

@ -34,4 +34,19 @@ export default tseslint.config(
// Tell the vue parser that it should use the ts parser instead of the js parser.
{ files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } } },
// My own rules.
//
// https://eslint.org/docs/latest/rules/
// https://typescript-eslint.io/rules/
// https://eslint.vuejs.org/rules/
{
rules: {
"@typescript-eslint/explicit-function-return-type": "error",
"vue/block-lang": ["error", { script: { lang: "ts" } }],
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
"vue/component-api-style": ["error", ["script-setup"]],
"vue/v-for-delimiter-style": ["error", "of"],
},
},
);