We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 563f96e commit 7d32430Copy full SHA for 7d32430
src/validators/filenameCase.ts
@@ -1,8 +1,9 @@
1
import type { ContextCheckFunction } from '../types/check.ts'
2
3
export const filenameCase: ContextCheckFunction = (schema, context) => {
4
+ const lowercase = context.file.name.toLowerCase()
5
const caseCollision = context.file.parent?.files.filter(otherFile => {
- return (context.file.name.toLowerCase() === otherFile.name.toLowerCase() && context.file.name != otherFile.name)
6
+ return (otherFile != context.file && otherFile.name.toLowerCase() === lowercase)
7
})
8
if (caseCollision?.length) {
9
context.dataset.issues.add({
0 commit comments