From ca232814d34cc0a00197e7d7d33cd565dbc0dfe9 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Mon, 4 Mar 2024 08:51:04 -0700 Subject: [PATCH] chore: bump eslint-config-oclif --- package.json | 2 +- src/base.ts | 2 +- src/nock.ts | 2 +- src/stub.ts | 4 +--- yarn.lock | 24 +++++++++++++++++++----- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 39faa5a..a3d0b30 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "chai": "^4.4.1", "chalk": "^4.1.0", "eslint": "^8.57.0", - "eslint-config-oclif": "^5", + "eslint-config-oclif": "^5.0.3", "eslint-config-oclif-typescript": "^2.0.1", "http-call": "^5.2.3", "markdown-toc": "^1.2.0", diff --git a/src/base.ts b/src/base.ts index 56aeb85..cf48e79 100644 --- a/src/base.ts +++ b/src/base.ts @@ -36,7 +36,7 @@ const base = (context: I): Types.Base => { arg1 = undefined } - if (!arg1) arg1 = context.expectation || 'test' + arg1 ||= context.expectation || 'test' async function run(this: Types.ITestCallbackContext, done?: Types.MochaDone) { context = assignWithProps({}, originalContext) if (context.retries) this.retries(context.retries) diff --git a/src/nock.ts b/src/nock.ts index 90d3e37..bdf9c69 100644 --- a/src/nock.ts +++ b/src/nock.ts @@ -24,7 +24,7 @@ export function nock(host: string, options: NockCallback | NockOptions, cb?: Noc const intercepter = nock(host, options) return { async run(ctx: {nock: number}) { - ctx.nock = ctx.nock || 0 + ctx.nock ||= 0 await cb!(intercepter) ctx.nock++ }, diff --git a/src/stub.ts b/src/stub.ts index d4a8624..5e6da3b 100644 --- a/src/stub.ts +++ b/src/stub.ts @@ -14,9 +14,7 @@ export default function , K extends keyof T> ( let stub: SinonStub return { run(ctx: { sandbox: SinonSandbox }) { - if (!ctx.sandbox) { - ctx.sandbox = createSandbox() - } + ctx.sandbox ||= createSandbox() stub = fn(ctx.sandbox.stub(object, path)) }, diff --git a/yarn.lock b/yarn.lock index dee83ec..9953dcb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -920,12 +920,12 @@ eslint-config-oclif-typescript@^2.0.1: eslint-plugin-mocha "^10.1.0" eslint-plugin-node "^11.1.0" -eslint-config-oclif@^5: - version "5.0.2" - resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-5.0.2.tgz#127fbb803629e6f913353f6975e413f77dfec373" - integrity sha512-5Ut0Rb1UfTJD54KMIA34SiJ7j3uUHfgn73LqkNEZx+mgTAAAL1+6/6uN0RJhmyp+9/HBIlO3v3pCX0pRR5knWQ== +eslint-config-oclif@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-5.0.3.tgz#5ec3ac4db8e882de87e1412a03715f3a82e65784" + integrity sha512-H3pvoSCfni23l81agc7/r8jxQ7bVIKNqbLsN8eYG8w2wEpsACskplK3VEPzIrO8NSFDcxQJIxoVXxp94kXexTA== dependencies: - eslint-config-xo-space "^0.34.0" + eslint-config-xo-space "^0.35.0" eslint-plugin-mocha "^10.3.0" eslint-plugin-node "^11.1.0" eslint-plugin-unicorn "^48.0.1" @@ -937,6 +937,13 @@ eslint-config-xo-space@^0.34.0: dependencies: eslint-config-xo "^0.43.0" +eslint-config-xo-space@^0.35.0: + version "0.35.0" + resolved "https://registry.yarnpkg.com/eslint-config-xo-space/-/eslint-config-xo-space-0.35.0.tgz#fdc2741c601a011e3ba185f07e2e78b6eed9d3dc" + integrity sha512-+79iVcoLi3PvGcjqYDpSPzbLfqYpNcMlhsCBRsnmDoHAn4npJG6YxmHpelQKpXM7v/EeZTUKb4e1xotWlei8KA== + dependencies: + eslint-config-xo "^0.44.0" + eslint-config-xo@^0.43.0: version "0.43.1" resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz#c2ac8993f6e429048c813f599265d1636a0bc060" @@ -944,6 +951,13 @@ eslint-config-xo@^0.43.0: dependencies: confusing-browser-globals "1.0.11" +eslint-config-xo@^0.44.0: + version "0.44.0" + resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.44.0.tgz#b4a68da791ecfd329bc7e1f88f9edea3d4dca70c" + integrity sha512-YG4gdaor0mJJi8UBeRJqDPO42MedTWYMaUyucF5bhm2pi/HS98JIxfFQmTLuyj6hGpQlAazNfyVnn7JuDn+Sew== + dependencies: + confusing-browser-globals "1.0.11" + eslint-import-resolver-node@^0.3.7: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac"