Skip to content

Commit 0321ede

Browse files
ST-DDTShinigami92
andauthored
chore: apply suggestions
Co-authored-by: Shinigami <[email protected]>
1 parent cd012c7 commit 0321ede

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/generateLocales.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ function removeTsSuffix(files: string[]): string[] {
4444
}
4545

4646
function escapeImport(module: string): string {
47-
if (module === 'name' || module === 'type' || module === 'switch') {
47+
if (['name', 'type', 'switch'].includes(module)) {
4848
return `${module}_`;
4949
} else {
5050
return module;
5151
}
5252
}
5353

5454
function escapeField(module: string): string {
55-
if (module === 'name' || module === 'type' || module === 'switch') {
55+
if (['name', 'type', 'switch'].includes(module)) {
5656
return `${module}: ${module}_`;
5757
} else {
5858
return module;
@@ -180,7 +180,7 @@ function generateRecursiveModuleIndexes(
180180
if (lstatSync(pathModule).isDirectory()) {
181181
let moduleDefinition =
182182
definition === 'any' ? 'any' : `${definition}['${submodule}']`;
183-
let moduleFiles: string[] = undefined;
183+
let moduleFiles: string[];
184184

185185
// Overwrite types of src/locales/<locale>/<module>/index.ts for known DEFINITIONS
186186
if (depth === 1) {

0 commit comments

Comments
 (0)