Enable and fix custom eslint rules
This commit is contained in:
parent
ca929a37d1
commit
9f3789e032
8 changed files with 38 additions and 23 deletions
|
|
@ -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"],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue