Skip to content

Commit ed3f645

Browse files
committed
🐛 Fix lint errors
1 parent a2677cb commit ed3f645

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

dist/index.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -30666,11 +30666,11 @@ const copy = async (src, dest, isDirectory, file) => {
3066630666
core.debug(`Render all files in directory ${ src } to ${ dest }`)
3066730667

3066830668
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
30669-
for (const file of srcFileList) {
30670-
if (!filterFunc(file)) { continue }
30669+
for (const srcFile of srcFileList) {
30670+
if (!filterFunc(srcFile)) { continue }
3067130671

30672-
const srcPath = path.join(src, file)
30673-
const destPath = path.join(dest, file)
30672+
const srcPath = path.join(src, srcFile)
30673+
const destPath = path.join(dest, srcFile)
3067430674
await write(srcPath, destPath, file.template)
3067530675
}
3067630676
} else {
@@ -30690,15 +30690,15 @@ const copy = async (src, dest, isDirectory, file) => {
3069030690
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
3069130691
const destFileList = await readfiles(dest, { readContents: false, hidden: true })
3069230692

30693-
for (const file of destFileList) {
30694-
if (srcFileList.indexOf(file) === -1) {
30695-
const filePath = path.join(dest, file)
30693+
for (const destFile of destFileList) {
30694+
if (srcFileList.indexOf(destFile) === -1) {
30695+
const filePath = path.join(dest, destFile)
3069630696
core.debug(`Found a orphaned file in the target repo - ${ filePath }`)
3069730697

30698-
if (exclude !== undefined && exclude.includes(path.join(src, file))) {
30699-
core.debug(`Excluding file ${ file }`)
30698+
if (file.exclude !== undefined && file.exclude.includes(path.join(src, destFile))) {
30699+
core.debug(`Excluding file ${ destFile }`)
3070030700
} else {
30701-
core.debug(`Removing file ${ file }`)
30701+
core.debug(`Removing file ${ destFile }`)
3070230702
await fs.remove(filePath)
3070330703
}
3070430704
}

src/helpers.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ const copy = async (src, dest, isDirectory, file) => {
9191
core.debug(`Render all files in directory ${ src } to ${ dest }`)
9292

9393
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
94-
for (const file of srcFileList) {
95-
if (!filterFunc(file)) { continue }
94+
for (const srcFile of srcFileList) {
95+
if (!filterFunc(srcFile)) { continue }
9696

97-
const srcPath = path.join(src, file)
98-
const destPath = path.join(dest, file)
97+
const srcPath = path.join(src, srcFile)
98+
const destPath = path.join(dest, srcFile)
9999
await write(srcPath, destPath, file.template)
100100
}
101101
} else {
@@ -115,15 +115,15 @@ const copy = async (src, dest, isDirectory, file) => {
115115
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
116116
const destFileList = await readfiles(dest, { readContents: false, hidden: true })
117117

118-
for (const file of destFileList) {
119-
if (srcFileList.indexOf(file) === -1) {
120-
const filePath = path.join(dest, file)
118+
for (const destFile of destFileList) {
119+
if (srcFileList.indexOf(destFile) === -1) {
120+
const filePath = path.join(dest, destFile)
121121
core.debug(`Found a orphaned file in the target repo - ${ filePath }`)
122122

123-
if (exclude !== undefined && exclude.includes(path.join(src, file))) {
124-
core.debug(`Excluding file ${ file }`)
123+
if (file.exclude !== undefined && file.exclude.includes(path.join(src, destFile))) {
124+
core.debug(`Excluding file ${ destFile }`)
125125
} else {
126-
core.debug(`Removing file ${ file }`)
126+
core.debug(`Removing file ${ destFile }`)
127127
await fs.remove(filePath)
128128
}
129129
}

0 commit comments

Comments
 (0)