diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6dc1c9bb8ef..0f4d21c0d57 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -51,7 +51,6 @@ module.exports = defineConfig({ 'unicorn/better-regex': 'off', 'unicorn/consistent-function-scoping': 'off', 'unicorn/import-style': 'off', - 'unicorn/no-await-expression-member': 'off', 'unicorn/no-object-as-default-parameter': 'off', 'unicorn/numeric-separators-style': 'off', 'unicorn/prefer-export-from': 'off', diff --git a/scripts/generate-locales.ts b/scripts/generate-locales.ts index 9e9c4bd32dd..d4268778a47 100644 --- a/scripts/generate-locales.ts +++ b/scripts/generate-locales.ts @@ -338,9 +338,7 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) { console.log(`Running data normalization for:`, filePath); - const fileContent = ( - await readFile(filePath, { encoding: 'utf8' }) - ).toString(); + const fileContent = await readFile(filePath, { encoding: 'utf8' }); const searchString = 'export default '; const compareIndex = fileContent.indexOf(searchString) + searchString.length; const compareString = fileContent.substring(compareIndex); diff --git a/test/faker.spec.ts b/test/faker.spec.ts index 78e07de0a11..749e850110d 100644 --- a/test/faker.spec.ts +++ b/test/faker.spec.ts @@ -18,7 +18,8 @@ describe('faker', () => { .filter((key) => typeof console[key] === 'function') .map((methodName) => vi.spyOn(console, methodName)); - (await import('..')).default; + const file: unknown = await import('..'); + expect(file).toBeDefined(); new Faker({ locale: { metadata: { title: '' } } });