Lint weird variable names
This commit is contained in:
parent
8eaf465101
commit
328922bd7b
1 changed files with 31 additions and 1 deletions
|
|
@ -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" } }],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue