From 3760e7dc71f10b115a8b09d4fbd8066a18546c7f Mon Sep 17 00:00:00 2001 From: dw-0 Date: Sat, 5 Oct 2024 21:30:42 +0200 Subject: [PATCH] feat: define naming convention switch naming convention rule to warn Signed-off-by: Dominik Willner --- .eslintrc.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3f9b71fa0..885d36187 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -47,7 +47,33 @@ } ], "@typescript-eslint/member-ordering": "warn", - "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/naming-convention": [ + "warn", + { + "selector": "default", + "format": ["camelCase"], + "leadingUnderscore": "allow", + "trailingUnderscore": "allow" + }, + { + "selector": ["variable", "classProperty", "typeProperty"], + "format": ["camelCase", "UPPER_CASE"], + "leadingUnderscore": "allow", + "trailingUnderscore": "allow" + }, + { + "selector": "objectLiteralProperty", + "format": null + }, + { + "selector": "enumMember", + "format": ["camelCase", "UPPER_CASE", "PascalCase"] + }, + { + "selector": "typeLike", + "format": ["PascalCase"] + } + ], "@typescript-eslint/no-empty-interface": "warn", "@typescript-eslint/no-inferrable-types": [ "warn",