Skip to content

Commit 7d32430

Browse files
rwblaireffigies
andauthored
Update src/validators/filenameCase.ts
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 563f96e commit 7d32430

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validators/filenameCase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { ContextCheckFunction } from '../types/check.ts'
22

33
export const filenameCase: ContextCheckFunction = (schema, context) => {
4+
const lowercase = context.file.name.toLowerCase()
45
const caseCollision = context.file.parent?.files.filter(otherFile => {
5-
return (context.file.name.toLowerCase() === otherFile.name.toLowerCase() && context.file.name != otherFile.name)
6+
return (otherFile != context.file && otherFile.name.toLowerCase() === lowercase)
67
})
78
if (caseCollision?.length) {
89
context.dataset.issues.add({

0 commit comments

Comments
 (0)