Skip to content

Commit

Permalink
deps!: update eslint-config-ipfs (#1374)
Browse files Browse the repository at this point in the history
- See ipfs/eslint-config-ipfs#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
}
```
  • Loading branch information
wemeetagain committed Sep 30, 2023
1 parent 2fd5479 commit 5fadfb7
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@ interface TestOptions {
* Before tests hook
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
before: (options: GlobalOptions & TestOptions) => Promise<TestBeforeResult | void >
before(options: GlobalOptions & TestOptions): Promise<TestBeforeResult | void >
/**
* After tests hook
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
after: (options: GlobalOptions & TestOptions, beforeResult: TestBeforeResult | void) => Promise<void>
after(options: GlobalOptions & TestOptions, beforeResult: TestBeforeResult | void): Promise<void>
}

interface TestBeforeResult {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface ExportedButNotInExports {
aMethod: () => void
aMethod(): void
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export interface ExportedButNotInExports {
aMethod: () => void
aMethod(): void
}
4 changes: 2 additions & 2 deletions test/fixtures/projects/a-ts-project/src/a-module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface ExportedButNotInExports {
aMethod: () => void
aMethod(): void
}

export interface UsedButNotExported {
aMethod: () => void
aMethod(): void
}
2 changes: 1 addition & 1 deletion test/fixtures/projects/a-ts-project/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useDerp = (): void => {
}

export interface AnExportedInterface {
aMethod: () => void
aMethod(): void
}

export type { ExportedButNotInExports } from './a-module.js'
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/projects/an-esm-project/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface ExportedButNotInExports {
aMethod: () => void
aMethod(): void
}

export interface UsedButNotExported {
aMethod: () => void
aMethod(): void
}

0 comments on commit 5fadfb7

Please sign in to comment.