Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit 62b86a3

Browse files
feat: Reduce aggressiveness of typescript naming-convention (#36)
1 parent 0833ac9 commit 62b86a3

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

lib/typescript.js

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,49 @@ module.exports = {
3838
leadingUnderscore: "allow",
3939
},
4040
{
41-
selector: ["typeLike"],
41+
selector: ["typeLike", "enumMember"],
4242
format: ["PascalCase"],
4343
},
44+
{
45+
selector: ["parameter"],
46+
modifiers: ["destructured"],
47+
format: null,
48+
},
49+
{
50+
selector: ["property", "objectLiteralProperty"],
51+
format: null,
52+
},
53+
{
54+
selector: [
55+
"classProperty",
56+
"objectLiteralProperty",
57+
"typeProperty",
58+
"classMethod",
59+
"objectLiteralMethod",
60+
"typeMethod",
61+
"accessor",
62+
"enumMember"
63+
],
64+
modifiers: ["requiresQuotes"],
65+
format: null,
66+
},
4467
{
4568
selector: ["variable"],
4669
modifiers: ["const"],
47-
format: ["camelCase", "UPPER_CASE", "snake_case"],
70+
types: ["function"],
71+
format: ["camelCase", "PascalCase"],
4872
leadingUnderscore: "allow",
4973
},
5074
{
5175
selector: ["variable"],
5276
modifiers: ["destructured"],
53-
format: ["camelCase", "UPPER_CASE", "snake_case"],
77+
format: null,
78+
},
79+
{
80+
selector: ["variable"],
81+
modifiers: ["const"],
82+
types: ["boolean", "string", "number", "array"],
83+
format: ["camelCase", "UPPER_CASE"],
5484
leadingUnderscore: "allow",
5585
},
5686
{
@@ -59,10 +89,6 @@ module.exports = {
5989
format: ["camelCase"],
6090
leadingUnderscore: "require",
6191
},
62-
{
63-
selector: ["interface"],
64-
format: ["PascalCase"],
65-
},
6692
],
6793
},
6894
};

0 commit comments

Comments
 (0)