mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 14:50:21 +00:00
Address code review feedback
- Remove awkward blank lines left after removing eslint-disable comments - Add baseUrl to tsconfig.json for proper paths resolution Co-authored-by: henrymercer <14129055+henrymercer@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,6 @@ function mockGetMetaVersionHeader(
|
||||
};
|
||||
const spyGetContents = sinon
|
||||
.stub(client.rest.meta, "get")
|
||||
|
||||
.resolves(response as any);
|
||||
sinon.stub(api, "getApiClient").value(() => client);
|
||||
return spyGetContents;
|
||||
|
||||
@@ -116,7 +116,6 @@ export async function getGitHubVersionFromApi(
|
||||
|
||||
// Doesn't strictly have to be the meta endpoint as we're only
|
||||
// using the response headers which are available on every request.
|
||||
|
||||
const response = await apiClient.rest.meta.get();
|
||||
|
||||
// This happens on dotcom, although we expect to have already returned in that
|
||||
|
||||
@@ -115,7 +115,6 @@ function mockGetContents(
|
||||
};
|
||||
const spyGetContents = sinon
|
||||
.stub(client.rest.repos, "getContent")
|
||||
|
||||
.resolves(response as any);
|
||||
sinon.stub(api, "getApiClient").value(() => client);
|
||||
sinon.stub(api, "getApiClientWithExternalAuth").value(() => client);
|
||||
@@ -131,7 +130,6 @@ function mockListLanguages(languages: string[]) {
|
||||
for (const language of languages) {
|
||||
response.data[language] = 123;
|
||||
}
|
||||
|
||||
sinon.stub(client.rest.repos, "listLanguages").resolves(response as any);
|
||||
sinon.stub(api, "getApiClient").value(() => client);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
|
||||
/* Module Resolution Options */
|
||||
"baseUrl": ".", /* Base directory to resolve non-absolute module names. */
|
||||
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
"resolveJsonModule": true,
|
||||
"paths": {
|
||||
|
||||
Reference in New Issue
Block a user