Skip to content

Commit c6ae6a0

Browse files
rachmariheiskr
andauthored
allow fixture file as source to content linter (#52631)
Co-authored-by: Kevin Heis <[email protected]>
1 parent cc7a261 commit c6ae6a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/content-linter/scripts/lint-content.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function getFilesToLint(paths) {
323323
fileList.yml.push(...walkFiles(absPath, ['.yml']))
324324
}
325325
} else {
326-
if (isInDir(absPath, contentDir)) {
326+
if (isInDir(absPath, contentDir) || isAFixtureMdFile(absPath)) {
327327
fileList.content.push(absPath)
328328
} else if (isInDir(absPath, dataDir)) {
329329
if (absPath.endsWith('.yml')) {
@@ -691,3 +691,7 @@ function isOptionsValid() {
691691
}
692692
return true
693693
}
694+
695+
function isAFixtureMdFile(filePath) {
696+
return filePath.includes('/src') && filePath.includes('/fixtures') && filePath.endsWith('.md')
697+
}

0 commit comments

Comments
 (0)