Skip to content

Commit

Permalink
fix(TypeScript): Disable @typescript-eslint/method-signature-style
Browse files Browse the repository at this point in the history
…for `d.ts` files
  • Loading branch information
jhnns committed Aug 2, 2021
1 parent fd9f40b commit 87e915b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/typescript/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface SomeInterface {
// Should not complain about the method signature style here because
// it's sometimes necessary to define these overloads for 3rd party packages
someMethod(param: boolean): void;
someMethod(param1: number, param2: number): void;
}
2 changes: 2 additions & 0 deletions typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ module.exports = {
rules: {
// In d.ts files it might be necessary to merge an existing interface
"@typescript-eslint/consistent-type-definitions": "off",
// In d.ts files it's sometimes necessary to overload existing methods
"@typescript-eslint/method-signature-style": "off",
// Unused vars can be common in d.ts files when declaration merging is used
"@typescript-eslint/no-unused-vars": "off",
// When someone wants to extend the typings of a third-party module, it might
Expand Down

0 comments on commit 87e915b

Please sign in to comment.