1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Require underscore for private methods (#23138)

This commit is contained in:
Petar Petrov
2024-12-04 16:05:49 +02:00
committed by GitHub
parent 9396d5cf8c
commit d77dd5300e
23 changed files with 30 additions and 51 deletions

View File

@@ -114,13 +114,7 @@ export default [
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/naming-convention": [
"off",
{
selector: "default",
format: ["camelCase", "snake_case"],
leadingUnderscore: "allow",
trailingUnderscore: "allow",
},
"warn",
{
selector: ["variable"],
format: ["camelCase", "snake_case", "UPPER_CASE"],
@@ -131,6 +125,18 @@ export default [
selector: "typeLike",
format: ["PascalCase"],
},
{
selector: "method",
modifiers: ["public"],
format: ["camelCase"],
leadingUnderscore: "forbid",
},
{
selector: "method",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
},
],
"@typescript-eslint/no-unused-vars": "off",