File tree Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Expand file tree Collapse file tree 2 files changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -45,23 +45,15 @@ const defaultOptions: Options = [
45
45
{
46
46
selector: ' default' ,
47
47
format: [' camelCase' ],
48
+ leadingUnderscore: ' allow' ,
49
+ trailingUnderscore: ' allow' ,
48
50
},
49
51
50
52
{
51
53
selector: ' variable' ,
52
54
format: [' camelCase' , ' UPPER_CASE' ],
53
- },
54
- {
55
- selector: ' parameter' ,
56
- format: [' camelCase' ],
57
55
leadingUnderscore: ' allow' ,
58
- },
59
-
60
- {
61
- selector: ' memberLike' ,
62
- modifiers: [' private' ],
63
- format: [' camelCase' ],
64
- leadingUnderscore: ' require' ,
56
+ trailingUnderscore: ' allow' ,
65
57
},
66
58
67
59
{
Original file line number Diff line number Diff line change @@ -274,25 +274,21 @@ const SCHEMA: JSONSchema.JSONSchema4 = {
274
274
275
275
// #endregion Schema Config
276
276
277
+ // This essentially mirrors eslint's camelcase rule
278
+ // note that that rule ignores leading and trailing underscores and only checks those in the middle of a variable name
277
279
const defaultCamelCaseAllTheThingsConfig : Options = [
278
280
{
279
281
selector : 'default' ,
280
282
format : [ 'camelCase' ] ,
283
+ leadingUnderscore : 'allow' ,
284
+ trailingUnderscore : 'allow' ,
281
285
} ,
282
286
283
287
{
284
288
selector : 'variable' ,
285
289
format : [ 'camelCase' , 'UPPER_CASE' ] ,
286
- } ,
287
- {
288
- selector : 'parameter' ,
289
- format : [ 'camelCase' ] ,
290
290
leadingUnderscore : 'allow' ,
291
- } ,
292
-
293
- {
294
- selector : 'memberLike' ,
295
- format : [ 'camelCase' ] ,
291
+ trailingUnderscore : 'allow' ,
296
292
} ,
297
293
298
294
{
You can’t perform that action at this time.
0 commit comments