@@ -104,6 +104,38 @@ describe("convertVariableName", () => {
104104 } ) ;
105105 } ) ;
106106
107+ test ( "conversion with allow-pascal-case argument with check-format" , ( ) => {
108+ const result = convertVariableName ( {
109+ ruleArguments : [ "allow-pascal-case" , "check-format" ] ,
110+ } ) ;
111+
112+ expect ( result ) . toEqual ( {
113+ rules : [
114+ {
115+ ruleName : "@typescript-eslint/naming-convention" ,
116+ rules : [
117+ {
118+ selector : "variable" ,
119+ format : [ "camelCase" , "UPPER_CASE" , "PascalCase" ] ,
120+ leadingUnderscore : "forbid" ,
121+ trailingUnderscore : "forbid" ,
122+ } ,
123+ ] ,
124+ } ,
125+ {
126+ notices : [ ForbiddenLeadingTrailingIdentifierMsg ] ,
127+ ruleName : "no-underscore-dangle" ,
128+ } ,
129+ {
130+ ruleName : "id-denylist" ,
131+ } ,
132+ {
133+ ruleName : "id-match" ,
134+ } ,
135+ ] ,
136+ } ) ;
137+ } ) ;
138+
107139 test ( "conversion with allow-snake-case argument without check-format argument" , ( ) => {
108140 const result = convertVariableName ( {
109141 ruleArguments : [ "allow-snake-case" ] ,
@@ -136,6 +168,38 @@ describe("convertVariableName", () => {
136168 } ) ;
137169 } ) ;
138170
171+ test ( "conversion with allow-snake-case argument with check-format" , ( ) => {
172+ const result = convertVariableName ( {
173+ ruleArguments : [ "allow-snake-case" , "check-format" ] ,
174+ } ) ;
175+
176+ expect ( result ) . toEqual ( {
177+ rules : [
178+ {
179+ ruleName : "@typescript-eslint/naming-convention" ,
180+ rules : [
181+ {
182+ selector : "variable" ,
183+ format : [ "camelCase" , "UPPER_CASE" , "snake_case" ] ,
184+ leadingUnderscore : "forbid" ,
185+ trailingUnderscore : "forbid" ,
186+ } ,
187+ ] ,
188+ } ,
189+ {
190+ notices : [ ForbiddenLeadingTrailingIdentifierMsg ] ,
191+ ruleName : "no-underscore-dangle" ,
192+ } ,
193+ {
194+ ruleName : "id-denylist" ,
195+ } ,
196+ {
197+ ruleName : "id-match" ,
198+ } ,
199+ ] ,
200+ } ) ;
201+ } ) ;
202+
139203 test ( "conversion with allow-leading-underscore without check-format argument" , ( ) => {
140204 const result = convertVariableName ( {
141205 ruleArguments : [ "allow-leading-underscore" ] ,
@@ -388,7 +452,7 @@ describe("convertVariableName", () => {
388452 rules : [
389453 {
390454 selector : "variable" ,
391- format : [ "camelCase" , "UPPER_CASE" ] ,
455+ format : [ "camelCase" , "UPPER_CASE" , "PascalCase" , "snake_case" ] ,
392456 leadingUnderscore : "allow" ,
393457 trailingUnderscore : "allow" ,
394458 } ,
0 commit comments