From 75f8c936cbd64dd2ded9b854e32770a7606a35a6 Mon Sep 17 00:00:00 2001 From: Timo Bechtel <48655057+TimoBechtel@users.noreply.github.com> Date: Sat, 23 Mar 2024 22:02:31 +0100 Subject: [PATCH] feat(eslint): allow ts-expect-error for test files --- eslint/core.cjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eslint/core.cjs b/eslint/core.cjs index a8dd12a..e031ee9 100644 --- a/eslint/core.cjs +++ b/eslint/core.cjs @@ -45,5 +45,15 @@ module.exports = defineConfig({ require.resolve('./rules/typescript.cjs'), ], }, + { + files: ['*.test.ts?(x)', '*.spec.ts?(x)'], + rules: { + // ts-expect-error makes sense for tests + '@typescript-eslint/ban-ts-comment': [ + 'off', + { 'ts-expect-error': 'off' }, + ], + }, + }, ], });