Skip to content

Commit

Permalink
infra(unicorn): no-await-expression-member (#2812)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Apr 21, 2024
1 parent b27d4fc commit 81d0718
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 1 addition & 3 deletions scripts/generate-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion test/faker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '' } } });

Expand Down

0 comments on commit 81d0718

Please sign in to comment.