Skip to content

Commit 4011531

Browse files
committed
lint
1 parent 5e97f5a commit 4011531

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/generate-md-exports.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import imgLinks from '@pondorasti/remark-img-links';
55
import {selectAll} from 'hast-util-select';
66
import {createHash} from 'node:crypto';
77
import {createReadStream, createWriteStream, existsSync} from 'node:fs';
8-
import {mkdir, opendir, readFile, rm, writeFile} from 'node:fs/promises';
8+
import {mkdir, opendir, readdir, readFile, rm, stat, writeFile} from 'node:fs/promises';
99
import {cpus} from 'node:os';
1010
import * as path from 'node:path';
1111
import {compose, Readable} from 'node:stream';
@@ -101,7 +101,6 @@ async function createWork() {
101101
let cleanedCount = 0;
102102

103103
try {
104-
const {readdir, stat, rm} = await import('node:fs/promises');
105104
const files = await readdir(CACHE_DIR);
106105

107106
for (const file of files) {

src/mdx.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import yaml from 'js-yaml';
44
import {bundleMDX} from 'mdx-bundler';
55
import {BinaryLike, createHash} from 'node:crypto';
66
import {createReadStream, createWriteStream, mkdirSync} from 'node:fs';
7-
import {access, cp, mkdir, opendir, readFile} from 'node:fs/promises';
7+
import {access, cp, mkdir, opendir, readFile, rm, stat} from 'node:fs/promises';
88
import path from 'node:path';
99
// @ts-expect-error ts(2305) -- For some reason "compose" is not recognized in the types
1010
import {compose, Readable} from 'node:stream';
@@ -73,11 +73,12 @@ if (process.env.CI) {
7373
const now = Date.now();
7474
let cleanedCount = 0;
7575

76-
const {opendir, rm, stat} = await import('node:fs/promises');
7776
const dir = await opendir(CACHE_DIR);
7877

7978
for await (const dirent of dir) {
80-
if (!dirent.isFile() && !dirent.isDirectory()) continue;
79+
if (!dirent.isFile() && !dirent.isDirectory()) {
80+
continue;
81+
}
8182

8283
const itemPath = path.join(CACHE_DIR, dirent.name);
8384
try {

0 commit comments

Comments
 (0)