Skip to content

Commit f170e94

Browse files
committed
Lint
1 parent 3b19608 commit f170e94

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Patrick Eriksson
3+
Copyright (c) 2022 Patrick Eriksson
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

cspell.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"version": "0.2",
3-
"words": ["Eriksson", "paleite"],
3+
"words": ["ahmadnassri", "Eriksson", "paleite"],
44
"ignoreWords": ["pinst", "Wercker"]
55
}

src/git.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const getDiffFileList = (): string[] => {
6666
.split("\n")
6767
.map((filePath) => path.resolve(filePath));
6868
}
69+
6970
return diffFileListCache;
7071
};
7172

@@ -122,11 +123,13 @@ const getUntrackedFileList = (staged = false): string[] => {
122123
.split("\n")
123124
.map((filePath) => path.resolve(filePath));
124125
}
126+
125127
return untrackedFileListCache;
126128
};
127129

128130
const isHunkHeader = (input: string) => {
129131
const hunkHeaderRE = /^@@ [^@]* @@/u;
132+
130133
return hunkHeaderRE.exec(input);
131134
};
132135

@@ -187,4 +190,3 @@ export {
187190
getUntrackedFileList,
188191
hasCleanIndex,
189192
};
190-
export type { Range };

src/processors.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { Linter } from "eslint";
2-
import type { Range } from "./git";
32
import {
43
getDiffFileList,
54
getDiffForFile,
65
getRangesForDiff,
76
getUntrackedFileList,
87
hasCleanIndex,
98
} from "./git";
9+
import type { Range } from "./Range";
1010

1111
const STAGED = true;
1212

@@ -24,6 +24,7 @@ const getPreProcessor =
2424
process.env.VSCODE_CLI !== undefined ||
2525
!staged ||
2626
getDiffFileList().includes(filename);
27+
2728
return shouldBeProcessed ? [text] : [];
2829
};
2930

@@ -53,6 +54,7 @@ const getPostProcessor =
5354
line: 0,
5455
ruleId: null,
5556
};
57+
5658
return [fatalError];
5759
}
5860

0 commit comments

Comments
 (0)