diff options
| author | ST-DDT <[email protected]> | 2023-10-09 20:22:43 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-09 18:22:43 +0000 |
| commit | 350dfbf2c57f023a78567da60bf4792ebd1a41f7 (patch) | |
| tree | 876c2172b3a483e00ec888d8c981978a365cea9d /scripts/generateLocales.ts | |
| parent | 72bf57d9dfe6569f595e64441e02feb8d5d3165f (diff) | |
| download | faker-350dfbf2c57f023a78567da60bf4792ebd1a41f7.tar.xz faker-350dfbf2c57f023a78567da60bf4792ebd1a41f7.zip | |
infra(unicorn): no-array-push-push (#2454)
Diffstat (limited to 'scripts/generateLocales.ts')
| -rw-r--r-- | scripts/generateLocales.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/generateLocales.ts b/scripts/generateLocales.ts index fcf2fa26..67d0f779 100644 --- a/scripts/generateLocales.ts +++ b/scripts/generateLocales.ts @@ -183,14 +183,14 @@ async function generateLocalesIndexFile( content.push( ...modules.map( (module) => `import ${escapeImport(name, module)} from './${module}';` - ) - ); - - content.push(`\nconst ${name}${fieldType} = { + ), + '', + `const ${name}${fieldType} = { ${modules.map((module) => `${escapeField(name, module)},`).join('\n')} - };\n`); - - content.push(`export default ${name};`); + };`, + '', + `export default ${name};` + ); writeFileSync( resolve(path, 'index.ts'), |
