Skip to content

Commit

Permalink
Merge pull request #32454 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Apr 10, 2024
2 parents dcbd0b8 + ee54c30 commit 58eaa21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/content-linter/scripts/lint-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function getFilesToLint(paths) {
} else if (isInDir(absPath, dataDir)) {
if (absPath.endsWith('.yml')) {
fileList.yml.push(absPath)
} else {
} else if (absPath.endsWith('.md')) {
fileList.data.push(absPath)
}
}
Expand All @@ -342,7 +342,12 @@ function getFilesToLint(paths) {
function cleanPaths(filePaths) {
const clean = []
for (const filePath of filePaths) {
if (path.basename(filePath) === 'README.md') continue
if (
path.basename(filePath) === 'README.md' ||
(!filePath.endsWith('.md') &&
!filePath.endsWith('.yml'))
)
continue
const relPath = path.relative(root, filePath)
if (seen.has(relPath)) continue
seen.add(relPath)
Expand Down

0 comments on commit 58eaa21

Please sign in to comment.