Skip to content

Commit 5a7f3f8

Browse files
zoomote2[bot]roomoteedelauna
authored
[Refactor] Remove no-explicit-any suppressions: batch 3 (integrations) (#2309)
* refactor: remove no-explicit-any suppressions in integrations * test: address integrations review feedback and patch coverage * test: address integration review gaps and fix Knip CI --------- Co-authored-by: Roomote <[email protected]> Co-authored-by: Elliott de Launay <[email protected]>
1 parent bb6cbee commit 5a7f3f8

27 files changed

Lines changed: 1162 additions & 1009 deletions

‎knip.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"packages/core/src/custom-tools/__tests__/fixtures-override/**",
88
"src/integrations/misc/__tests__/performance/**",
99
"src/integrations/terminal/__tests__/setupTerminalTests.ts",
10-
"src/integrations/terminal/__tests__/streamUtils/index.ts",
1110
"src/services/tree-sitter/__tests__/helpers.ts"
1211
],
1312
"ignoreDependencies": ["lint-staged"],

‎src/eslint-suppressions.json‎

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,121 +1009,6 @@
10091009
"count": 5
10101010
}
10111011
},
1012-
"integrations/editor/DiffViewProvider.ts": {
1013-
"@typescript-eslint/no-explicit-any": {
1014-
"count": 1
1015-
}
1016-
},
1017-
"integrations/editor/__tests__/DiffViewProvider.spec.ts": {
1018-
"@typescript-eslint/no-explicit-any": {
1019-
"count": 310
1020-
}
1021-
},
1022-
"integrations/editor/__tests__/EditorUtils.spec.ts": {
1023-
"@typescript-eslint/no-explicit-any": {
1024-
"count": 3
1025-
}
1026-
},
1027-
"integrations/kimi-code/__tests__/oauth.spec.ts": {
1028-
"@typescript-eslint/no-explicit-any": {
1029-
"count": 1
1030-
}
1031-
},
1032-
"integrations/misc/__tests__/export-markdown.spec.ts": {
1033-
"@typescript-eslint/no-explicit-any": {
1034-
"count": 1
1035-
}
1036-
},
1037-
"integrations/misc/__tests__/open-file.spec.ts": {
1038-
"@typescript-eslint/no-explicit-any": {
1039-
"count": 11
1040-
}
1041-
},
1042-
"integrations/misc/__tests__/performance/processCarriageReturns.benchmark.ts": {
1043-
"@typescript-eslint/no-explicit-any": {
1044-
"count": 2
1045-
}
1046-
},
1047-
"integrations/terminal/__tests__/ExecaTerminalProcess.spec.ts": {
1048-
"@typescript-eslint/no-explicit-any": {
1049-
"count": 10
1050-
}
1051-
},
1052-
"integrations/terminal/__tests__/OutputInterceptor.test.ts": {
1053-
"@typescript-eslint/no-explicit-any": {
1054-
"count": 5
1055-
}
1056-
},
1057-
"integrations/terminal/__tests__/TerminalProcess.spec.ts": {
1058-
"@typescript-eslint/no-explicit-any": {
1059-
"count": 7
1060-
}
1061-
},
1062-
"integrations/terminal/__tests__/TerminalProcess.test.ts": {
1063-
"@typescript-eslint/no-explicit-any": {
1064-
"count": 2
1065-
}
1066-
},
1067-
"integrations/terminal/__tests__/TerminalProcessExec.bash.spec.ts": {
1068-
"@typescript-eslint/no-explicit-any": {
1069-
"count": 2
1070-
}
1071-
},
1072-
"integrations/terminal/__tests__/TerminalProcessExec.cmd.spec.ts": {
1073-
"@typescript-eslint/no-explicit-any": {
1074-
"count": 1
1075-
}
1076-
},
1077-
"integrations/terminal/__tests__/TerminalProcessExec.pwsh.spec.ts": {
1078-
"@typescript-eslint/no-explicit-any": {
1079-
"count": 1
1080-
}
1081-
},
1082-
"integrations/terminal/__tests__/TerminalProcessInterpretExitCode.spec.ts": {
1083-
"@typescript-eslint/no-explicit-any": {
1084-
"count": 3
1085-
}
1086-
},
1087-
"integrations/terminal/__tests__/TerminalProfile.spec.ts": {
1088-
"@typescript-eslint/no-explicit-any": {
1089-
"count": 34
1090-
}
1091-
},
1092-
"integrations/terminal/__tests__/TerminalRegistry.spec.ts": {
1093-
"@typescript-eslint/no-explicit-any": {
1094-
"count": 22
1095-
}
1096-
},
1097-
"integrations/terminal/__tests__/setupTerminalTests.ts": {
1098-
"@typescript-eslint/no-explicit-any": {
1099-
"count": 1
1100-
}
1101-
},
1102-
"integrations/terminal/__tests__/streamUtils/bashStream.ts": {
1103-
"@typescript-eslint/no-explicit-any": {
1104-
"count": 1
1105-
}
1106-
},
1107-
"integrations/terminal/__tests__/streamUtils/cmdStream.ts": {
1108-
"@typescript-eslint/no-explicit-any": {
1109-
"count": 1
1110-
}
1111-
},
1112-
"integrations/terminal/__tests__/streamUtils/index.ts": {
1113-
"@typescript-eslint/no-explicit-any": {
1114-
"count": 2
1115-
}
1116-
},
1117-
"integrations/terminal/__tests__/streamUtils/pwshStream.ts": {
1118-
"@typescript-eslint/no-explicit-any": {
1119-
"count": 1
1120-
}
1121-
},
1122-
"integrations/theme/getTheme.ts": {
1123-
"@typescript-eslint/no-explicit-any": {
1124-
"count": 9
1125-
}
1126-
},
11271012
"services/__tests__/zoo-code-auth.test.ts": {
11281013
"@typescript-eslint/no-explicit-any": {
11291014
"count": 3

‎src/integrations/editor/DiffViewProvider.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,10 @@ export class DiffViewProvider {
977977
() => {
978978
// Command executed successfully, now wait for the editor to appear
979979
},
980-
(err: any) => {
980+
(err: unknown) => {
981981
cleanup()
982-
reject(new Error(`Failed to execute diff command for ${uri.fsPath}: ${err.message}`))
982+
const message = err instanceof Error ? err.message : String(err)
983+
reject(new Error(`Failed to execute diff command for ${uri.fsPath}: ${message}`))
983984
},
984985
)
985986
})

0 commit comments

Comments
 (0)