Skip to content

Commit 3176874

Browse files
committed
Remove unused parameter
1 parent acfb083 commit 3176874

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/git.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ const getCachedDiff = (filePath: string, staged: boolean) =>
1515
diffCache.get(diffCacheKey(filePath, staged));
1616

1717
const diffCache = new Map<string, string>();
18-
const getDiffForFile = (
19-
filePath: string,
20-
staged = false,
21-
changesBetween = process.env.ESLINT_PLUGIN_DIFF_COMMIT ?? "HEAD"
22-
): string => {
18+
const getDiffForFile = (filePath: string, staged = false): string => {
2319
let diff = getCachedDiff(filePath, staged);
2420
if (diff === undefined) {
2521
const command = [
@@ -28,7 +24,7 @@ const getDiffForFile = (
2824
"--diff-filter=ACM",
2925
staged && "--staged",
3026
"--unified=0",
31-
changesBetween,
27+
process.env.ESLINT_PLUGIN_DIFF_COMMIT ?? "HEAD",
3228
"--",
3329
sanitizeFilePath(filePath),
3430
]
@@ -44,18 +40,15 @@ const getDiffForFile = (
4440
};
4541

4642
let diffFileListCache: string[];
47-
const getDiffFileList = (
48-
staged = false,
49-
changesBetween = process.env.ESLINT_PLUGIN_DIFF_COMMIT ?? "HEAD"
50-
): string[] => {
43+
const getDiffFileList = (staged = false): string[] => {
5144
if (diffFileListCache === undefined) {
5245
const command = [
5346
"git",
5447
"diff",
5548
"--diff-filter=ACM",
5649
"--name-only",
5750
staged && "--staged",
58-
changesBetween,
51+
process.env.ESLINT_PLUGIN_DIFF_COMMIT ?? "HEAD",
5952
]
6053
.filter(Boolean)
6154
.join(" ");

0 commit comments

Comments
 (0)