diff --git a/README.md b/README.md index 4a93810e4e..8cb0b69f37 100644 --- a/README.md +++ b/README.md @@ -615,7 +615,7 @@ const { lastIssues } = await octokit.graphql( { owner: "octokit", repo: "graphql.js", - } + }, ); ``` @@ -641,7 +641,7 @@ await octokit.graphql( mediaType: { previews: ["bane"], }, - } + }, ); ``` @@ -790,7 +790,7 @@ const { token } = await app.oauth.createToken({ async onVerification(verification) { await sendMessageToUser( request.body.phoneNumber, - `Your code is ${verification.user_code}. Enter it at ${verification.verification_uri}` + `Your code is ${verification.user_code}. Enter it at ${verification.verification_uri}`, ); }, }); diff --git a/package-lock.json b/package-lock.json index b7721d04f5..be9d26ecb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "jest": "^29.0.0", "mockdate": "^3.0.5", "node-fetch": "^2.6.7", - "prettier": "2.8.8", + "prettier": "3.0.0", "semantic-release": "^21.0.0", "semantic-release-plugin-update-version-in-files": "^1.1.0", "ts-jest": "^29.0.0", @@ -11276,15 +11276,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -21425,9 +21425,9 @@ } }, "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "dev": true }, "pretty-format": { diff --git a/package.json b/package.json index be336e41fa..7da44bd465 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "jest": "^29.0.0", "mockdate": "^3.0.5", "node-fetch": "^2.6.7", - "prettier": "2.8.8", + "prettier": "3.0.0", "semantic-release": "^21.0.0", "semantic-release-plugin-update-version-in-files": "^1.1.0", "ts-jest": "^29.0.0", diff --git a/src/octokit.ts b/src/octokit.ts index 378a11ca61..580afbcf76 100644 --- a/src/octokit.ts +++ b/src/octokit.ts @@ -12,7 +12,7 @@ export const Octokit = OctokitCore.plugin( restEndpointMethods, paginateRest, retry, - throttling + throttling, ).defaults({ userAgent: `octokit.js/${VERSION}`, throttle: { @@ -24,7 +24,7 @@ export const Octokit = OctokitCore.plugin( // istanbul ignore next no need to test internals of the throttle plugin function onRateLimit(retryAfter: number, options: any, octokit: any) { octokit.log.warn( - `Request quota exhausted for request ${options.method} ${options.url}` + `Request quota exhausted for request ${options.method} ${options.url}`, ); if (options.request.retryCount === 0) { @@ -37,7 +37,7 @@ function onRateLimit(retryAfter: number, options: any, octokit: any) { // istanbul ignore next no need to test internals of the throttle plugin function onSecondaryRateLimit(retryAfter: number, options: any, octokit: any) { octokit.log.warn( - `SecondaryRateLimit detected for request ${options.method} ${options.url}` + `SecondaryRateLimit detected for request ${options.method} ${options.url}`, ); if (options.request.retryCount === 0) { diff --git a/test/app.test.ts b/test/app.test.ts index b4dd634bb7..1119b6ee2d 100644 --- a/test/app.test.ts +++ b/test/app.test.ts @@ -81,7 +81,7 @@ describe("App", () => { headers: { authorization: `bearer ${BEARER}`, }, - } + }, ) .postOnce( "path:/app/installations/123/access_tokens", @@ -97,7 +97,7 @@ describe("App", () => { headers: { authorization: `bearer ${BEARER}`, }, - } + }, ) .getOnce("path:/installation/repositories", { total_count: 1, @@ -148,7 +148,7 @@ describe("App", () => { headers: { authorization: `bearer ${BEARER}`, }, - } + }, ) .postOnce( "path:/repos/octokit/octokit.js/issues", @@ -157,7 +157,7 @@ describe("App", () => { body: { title: "Hello, world!", }, - } + }, ); const octokit = await app.getInstallationOctokit(123); @@ -189,7 +189,7 @@ describe("App", () => { headers: { authorization: `bearer ${BEARER}`, }, - } + }, ) .postOnce( "path:/repos/octokit/octokit.js/issues/1/comments", @@ -198,7 +198,7 @@ describe("App", () => { body: { body: "Hello, World!", }, - } + }, ); app.webhooks.on("issues.opened", async ({ octokit, payload }) => { @@ -240,7 +240,7 @@ describe("App", () => { "x-hub-signature-256": await app.webhooks.sign(issuePayload), }, body: issuePayload, - } + }, ); expect(await response.text()).toEqual("ok\n"); diff --git a/test/smoke.test.ts b/test/smoke.test.ts index bd5ded4650..1dcd29c9d2 100644 --- a/test/smoke.test.ts +++ b/test/smoke.test.ts @@ -19,7 +19,7 @@ describe("Smoke tests", () => { new App({ appId: 123, privateKey: "private key here", - }) + }), ).not.toThrow(); }); @@ -40,7 +40,7 @@ describe("Smoke tests", () => { new OAuthApp({ clientId: "", clientSecret: "", - }) + }), ).not.toThrow(); }); diff --git a/test/typescript-validate.ts b/test/typescript-validate.ts index 856cb01ad6..e288ace9b1 100644 --- a/test/typescript-validate.ts +++ b/test/typescript-validate.ts @@ -27,7 +27,7 @@ export async function OctokitTest() { { owner: "", repo: "", - } + }, ); expect(issues[0].id);