Skip to content

Commit e7f607f

Browse files
committed
refactor: rename check
1 parent fcf1d0a commit e7f607f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
upload-coverage: false
1818
disable-test-package: true
1919

20-
check-kebab-case:
20+
check-filenames:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout code
@@ -28,5 +28,5 @@ jobs:
2828
with:
2929
node-version: '24'
3030

31-
- name: Run kebab-case check
31+
- name: Run filenames check
3232
run: node checkFilenames.mjs

checkFilenames.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ const folders = ['docs', 'blog'];
4343

4444
for (const folder of folders) {
4545
const folderPath = path.join(__dirname, folder);
46-
const nonKebabFiles = getAllFiles(folderPath);
47-
if (nonKebabFiles.length !== 0) {
48-
throw new Error(`Non-kebab-case files found:\n${nonKebabFiles.join('\n')}`);
46+
const incorrectFormatFiles = getAllFiles(folderPath);
47+
if (incorrectFormatFiles.length !== 0) {
48+
throw new Error(
49+
`Files with incorrect filename format found:\n${incorrectFormatFiles.join('\n')}`,
50+
);
4951
}
5052
}
5153
console.log('All files have passed the check.');

0 commit comments

Comments
 (0)