Skip to content

Commit 5950b07

Browse files
authored
Merge pull request #80 from atom-community/undefined-ignore [skip ci]
2 parents 33b5842 + fd9ea26 commit 5950b07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/typescript.cts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ function globifyGitIgnoreFileWithDeps(cwd: string, include: boolean) {
1616
const globifyGitIgnoreFileSync = makeSynchronous(globifyGitIgnoreFileWithDeps) as (
1717
cwd: string,
1818
include: boolean,
19-
) => GlobifiedEntry[]
19+
) => GlobifiedEntry[] | undefined
2020

2121
/** Check if there are any tsconfig.json files */
2222
function disableProjectBasedRules() {
2323
// get all the files that are ignored by git
24-
const ignore = globifyGitIgnoreFileSync(".", true).map((entry) => {
24+
const ignore = globifyGitIgnoreFileSync(".", true)?.map((entry) => {
2525
if (entry.included) {
2626
return `!${entry.glob}`
2727
}
2828
return entry.glob
29-
})
29+
}) ?? []
3030
ignore.push("./**/.git/**", "./**/node_modules/**")
3131

3232
// check if there are any ts files

0 commit comments

Comments
 (0)