Skip to content

Commit cfae2e6

Browse files
authored
fix:lint error (#1130)
1 parent df40b8f commit cfae2e6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
ruby 2.7.6
22
java adoptopenjdk-17.0.10+7
3+
nodejs 20.10.0

plugin/withAndroidDrawables.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { withDangerousMod } = require('@expo/config-plugins');
2-
const fs = require('fs');
3-
const path = require('path');
2+
const fs = require('node:fs');
3+
const path = require('node:path');
44

55
/**
66
* This config plugin copies files from the specified paths, like the assets
@@ -27,19 +27,19 @@ function withAndroidDrawables(config, { drawableFiles }) {
2727
}
2828

2929
// Copy each drawable file to the drawable directory
30-
drawableFiles.forEach((filePath) => {
30+
for (const filePath of drawableFiles) {
3131
const sourcePath = path.resolve(config.modRequest.projectRoot, filePath);
3232
const fileName = path.basename(filePath);
3333
const destPath = path.join(drawableDir, fileName);
3434

3535
if (!fs.existsSync(sourcePath)) {
3636
console.warn(`Warning: Drawable file not found: ${sourcePath}`);
37-
return;
37+
continue;
3838
}
3939

4040
// Copy the file
4141
fs.copyFileSync(sourcePath, destPath);
42-
});
42+
}
4343

4444
return config;
4545
},

0 commit comments

Comments
 (0)