Lint weird variable names

This commit is contained in:
Joscha 2025-03-03 00:21:52 +01:00
parent 8eaf465101
commit 328922bd7b

View file

@ -37,7 +37,37 @@ export default tseslint.config(
eqeqeq: "error", eqeqeq: "error",
// https://typescript-eslint.io/rules/ // https://typescript-eslint.io/rules/
"@typescript-eslint/explicit-function-return-type": "error", "@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/naming-convention": [
"warn",
// Default settings
// https://typescript-eslint.io/rules/naming-convention/#options
{
selector: "default",
format: ["camelCase"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
{
selector: "import",
format: ["camelCase", "PascalCase"],
},
{
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
{
selector: "typeLike",
format: ["PascalCase"],
},
// Prevent warnings in some specific cases
{
selector: "objectLiteralProperty",
format: null,
},
],
// https://eslint.vuejs.org/rules/ // https://eslint.vuejs.org/rules/
"vue/block-lang": ["error", { script: { lang: "ts" } }], "vue/block-lang": ["error", { script: { lang: "ts" } }],