Skip to content

Commit a901b7f

Browse files
committed
fix: fix the type of globifyGitIgnoreFileSync
1 parent 1526956 commit a901b7f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@
8282
"react": "react.js",
8383
"strict": "strict.js",
8484
"strict-react": "strict-react.js"
85-
}
85+
}

src/typescript.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { pluginImportRulesExtra, pluginImportTypeScriptRulesExtra } from "./plug
33
import { pluginNodeRules } from "./plugin-node-rules"
44
import makeSynchronous from "make-synchronous"
55
import { findOneFile } from "./utils"
6+
import type { GlobifiedEntry } from "globify-gitignore"
67

78
const tsFiles = ["**/*.tsx", "**/*.ts"]
89
const project = ["**/tsconfig.json", "!**/node_modules/**/tsconfig.json"]
@@ -12,7 +13,10 @@ function globifyGitIgnoreFileWithDeps(cwd: string, include: boolean) {
1213
const { globifyGitIgnoreFile } = require("globify-gitignore") as typeof import("globify-gitignore") // prettier-ignore
1314
return globifyGitIgnoreFile(cwd, include)
1415
}
15-
const globifyGitIgnoreFileSync = makeSynchronous(globifyGitIgnoreFileWithDeps)
16+
const globifyGitIgnoreFileSync = makeSynchronous(globifyGitIgnoreFileWithDeps) as (
17+
cwd: string,
18+
include: boolean,
19+
) => GlobifiedEntry[]
1620

1721
/** Check if there are any tsconfig.json files */
1822
function disableProjectBasedRules() {

0 commit comments

Comments
 (0)