From 5099f0f5c568913cbb88257c73ec0353a919fe63 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 12 Apr 2021 17:02:47 +0200 Subject: [PATCH] ESLint: Override config for tests This is done to to fix Issue #1098 Signed-off-by: Philip Molares --- .eslintrc.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0d821dc32..08b5558a0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,7 +8,26 @@ module.exports = { project: 'tsconfig.json', sourceType: 'module', }, - plugins: ['@typescript-eslint'], + overrides: [ + { + files: ['test/**', 'src/**/*.spec.ts'], + extends: ['plugin:jest/recommended'], + rules: { + '@typescript-eslint/unbound-method': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/require-await': 'off', + 'jest/unbound-method': 'error', + 'jest/expect-expect': [ + 'error', + { + assertFunctionNames: ['expect', 'request.**.expect'], + }, + ], + }, + }, + ], + plugins: ['@typescript-eslint', 'jest'], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended',