Skip to content

Commit

Permalink
fix: allow any args and referencing functions by property name (#232)
Browse files Browse the repository at this point in the history
Disables two rules:

`@typescript-eslint/no-unsafe-argument` - this prevents passing vars
with an `any` type to functions.

Unfortunately we still deal with untyped modules so this will happen.

`@typescript-eslint/unbound-method` - this prevents referencing functions
without invoking them.

We need to disable this to do things like pass functions passed as
part of an options object on to other functions.
  • Loading branch information
achingbrain authored Jul 23, 2024
1 parent 8690e08 commit 27ecf3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module.exports = {
'@typescript-eslint/await-thenable': 'error', // disallows awaiting a value that is not a "Thenable"
'@typescript-eslint/restrict-template-expressions': 'off', // allow values with `any` type in template literals
'@typescript-eslint/method-signature-style': ['error', 'method'], // enforce method signature style
'@typescript-eslint/no-unsafe-argument': 'off', // allow passing argswith `any` type to functions
'@typescript-eslint/unbound-method': 'off', // allow invoking functions that may be unbound (e.g. passed as part of an options object)
'no-unused-vars': 'off', // disable this rule to use @typescript-eslint/no-unused-vars instead
'@typescript-eslint/no-unused-vars': 'error', // disallow unused variables
'no-return-await': 'off', // disable this rule to use @typescript-eslint/return-await instead
Expand Down

0 comments on commit 27ecf3e

Please sign in to comment.