From 27ecf3e4055cd229339c62cc1a941e96a4e22852 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 23 Jul 2024 15:28:46 +0200 Subject: [PATCH] fix: allow `any` args and referencing functions by property name (#232) 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. --- src/ts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ts.js b/src/ts.js index ce51b41..5ed0f73 100644 --- a/src/ts.js +++ b/src/ts.js @@ -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