Archived
chore: fix lint baseline
This commit is contained in:
@@ -88,6 +88,7 @@ function parseStatus(raw: string): GitStatusResponse {
|
||||
}
|
||||
|
||||
function stateFor(code: string | undefined): GitFileState {
|
||||
if (code === undefined) return "unmodified";
|
||||
switch (code) {
|
||||
case ".": return "unmodified";
|
||||
case "M": return "modified";
|
||||
|
||||
@@ -41,7 +41,7 @@ function isProbablyBinary(buffer: Buffer): boolean {
|
||||
|
||||
function languageForPath(path: string): { language?: string } {
|
||||
const ext = path.split(".").pop()?.toLowerCase();
|
||||
const language = ext === undefined ? undefined : ({
|
||||
const languages: Record<string, string | undefined> = {
|
||||
ts: "typescript",
|
||||
tsx: "typescript",
|
||||
js: "javascript",
|
||||
@@ -56,6 +56,7 @@ function languageForPath(path: string): { language?: string } {
|
||||
sh: "shell",
|
||||
yml: "yaml",
|
||||
yaml: "yaml",
|
||||
} as Record<string, string | undefined>)[ext];
|
||||
};
|
||||
const language = ext === undefined ? undefined : languages[ext];
|
||||
return language === undefined ? {} : { language };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user