From 5fadfb70dc7874acb9265bcdc6b5da4a9d110ad1 Mon Sep 17 00:00:00 2001 From: Cayman Date: Sat, 30 Sep 2023 11:03:46 -0400 Subject: [PATCH] deps!: update eslint-config-ipfs (#1374) - See https://github.com/ipfs/eslint-config-ipfs/pull/190 BREAKING CHANGE: All interfaces now need to use method signature style rather than property function style eg: before ```ts interface Foo { bar: (baz: number) => void } ``` after ```ts interface Foo { bar(baz: number): void } ``` --- package.json | 2 +- src/types.ts | 4 ++-- .../a-monorepo/packages/a-workspace-project/src/types.ts | 2 +- .../packages/another-workspace-project/src/types.ts | 2 +- test/fixtures/projects/a-ts-project/src/a-module.ts | 4 ++-- test/fixtures/projects/a-ts-project/src/index.ts | 2 +- test/fixtures/projects/an-esm-project/src/types.ts | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index aa4e7d9f8..c9e2ba298 100644 --- a/package.json +++ b/package.json @@ -258,7 +258,7 @@ "env-paths": "^3.0.0", "esbuild": "^0.19.2", "eslint": "^8.31.0", - "eslint-config-ipfs": "^5.0.0", + "eslint-config-ipfs": "^6.0.0", "eslint-plugin-etc": "^2.0.2", "eslint-plugin-import": "^2.18.0", "eslint-plugin-jsdoc": "^46.4.3", diff --git a/src/types.ts b/src/types.ts index f8e677f24..ce7de3180 100644 --- a/src/types.ts +++ b/src/types.ts @@ -253,12 +253,12 @@ interface TestOptions { * Before tests hook */ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - before: (options: GlobalOptions & TestOptions) => Promise + before(options: GlobalOptions & TestOptions): Promise /** * After tests hook */ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - after: (options: GlobalOptions & TestOptions, beforeResult: TestBeforeResult | void) => Promise + after(options: GlobalOptions & TestOptions, beforeResult: TestBeforeResult | void): Promise } interface TestBeforeResult { diff --git a/test/fixtures/projects/a-monorepo/packages/a-workspace-project/src/types.ts b/test/fixtures/projects/a-monorepo/packages/a-workspace-project/src/types.ts index a0f8b6be4..08c6ad031 100644 --- a/test/fixtures/projects/a-monorepo/packages/a-workspace-project/src/types.ts +++ b/test/fixtures/projects/a-monorepo/packages/a-workspace-project/src/types.ts @@ -1,3 +1,3 @@ export interface ExportedButNotInExports { - aMethod: () => void + aMethod(): void } diff --git a/test/fixtures/projects/a-monorepo/packages/another-workspace-project/src/types.ts b/test/fixtures/projects/a-monorepo/packages/another-workspace-project/src/types.ts index a0f8b6be4..08c6ad031 100644 --- a/test/fixtures/projects/a-monorepo/packages/another-workspace-project/src/types.ts +++ b/test/fixtures/projects/a-monorepo/packages/another-workspace-project/src/types.ts @@ -1,3 +1,3 @@ export interface ExportedButNotInExports { - aMethod: () => void + aMethod(): void } diff --git a/test/fixtures/projects/a-ts-project/src/a-module.ts b/test/fixtures/projects/a-ts-project/src/a-module.ts index 9213777e3..a6dbc6a02 100644 --- a/test/fixtures/projects/a-ts-project/src/a-module.ts +++ b/test/fixtures/projects/a-ts-project/src/a-module.ts @@ -1,7 +1,7 @@ export interface ExportedButNotInExports { - aMethod: () => void + aMethod(): void } export interface UsedButNotExported { - aMethod: () => void + aMethod(): void } diff --git a/test/fixtures/projects/a-ts-project/src/index.ts b/test/fixtures/projects/a-ts-project/src/index.ts index 68870c473..f43b9a90c 100644 --- a/test/fixtures/projects/a-ts-project/src/index.ts +++ b/test/fixtures/projects/a-ts-project/src/index.ts @@ -14,7 +14,7 @@ export const useDerp = (): void => { } export interface AnExportedInterface { - aMethod: () => void + aMethod(): void } export type { ExportedButNotInExports } from './a-module.js' diff --git a/test/fixtures/projects/an-esm-project/src/types.ts b/test/fixtures/projects/an-esm-project/src/types.ts index 9213777e3..a6dbc6a02 100644 --- a/test/fixtures/projects/an-esm-project/src/types.ts +++ b/test/fixtures/projects/an-esm-project/src/types.ts @@ -1,7 +1,7 @@ export interface ExportedButNotInExports { - aMethod: () => void + aMethod(): void } export interface UsedButNotExported { - aMethod: () => void + aMethod(): void }