@book000/eslint-config 1.14.60 → 1.14.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/test.mjs +8 -2
package/package.json
CHANGED
package/test.mjs
CHANGED
|
@@ -215,9 +215,15 @@ async function main() {
|
|
|
215
215
|
.map((testCase) => testCase.dir)
|
|
216
216
|
.filter((dir) => dir && dir !== "__tmp__cli")
|
|
217
217
|
);
|
|
218
|
+
// クリーンアップ時に削除してよいのは、このテストで新規に作成したディレクトリのみとする
|
|
219
|
+
// (既存の src/__tests__ 等を誤って削除しないようにするため)
|
|
220
|
+
const createdExtraDirs = new Set();
|
|
218
221
|
for (const dir of extraDirs) {
|
|
219
222
|
const dirPath = path.join(srcDir, dir);
|
|
220
|
-
if (!fs.existsSync(dirPath))
|
|
223
|
+
if (!fs.existsSync(dirPath)) {
|
|
224
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
225
|
+
createdExtraDirs.add(dir);
|
|
226
|
+
}
|
|
221
227
|
}
|
|
222
228
|
|
|
223
229
|
// テスト用tsconfig.jsonを作成
|
|
@@ -322,7 +328,7 @@ async function main() {
|
|
|
322
328
|
|
|
323
329
|
fs.unlinkSync(flatConfigPath);
|
|
324
330
|
fs.rmSync(tmpDir, { recursive: true });
|
|
325
|
-
for (const dir of
|
|
331
|
+
for (const dir of createdExtraDirs) {
|
|
326
332
|
fs.rmSync(path.join(srcDir, dir), { recursive: true });
|
|
327
333
|
}
|
|
328
334
|
fs.unlinkSync(tsconfigPath);
|