From 9a0f1c879c35b1968c992b2ac3efb227cb33cf98 Mon Sep 17 00:00:00 2001 From: gitstart-twenty Date: Sat, 9 Mar 2024 00:32:41 +0000 Subject: [PATCH] Refactor according to review Co-authored-by: v1b3m Co-authored-by: Toledodev --- .../explicit-boolean-predicates-in-if.spec.ts | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 tools/eslint-rules/rules/explicit-boolean-predicates-in-if.spec.ts diff --git a/tools/eslint-rules/rules/explicit-boolean-predicates-in-if.spec.ts b/tools/eslint-rules/rules/explicit-boolean-predicates-in-if.spec.ts deleted file mode 100644 index 82dfdb3c1901..000000000000 --- a/tools/eslint-rules/rules/explicit-boolean-predicates-in-if.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { TSESLint } from '@typescript-eslint/experimental-utils'; - -import rule, { RULE_NAME } from '../rules/explicit-boolean-predicates-in-if'; - -const ruleTester = new TSESLint.RuleTester({ - parser: require.resolve('@typescript-eslint/parser'), - parserOptions: { - project: 'packages/twenty-front/tsconfig.*?.json', - }, -}); - -ruleTester.run(RULE_NAME, rule, { - valid: [ - { - code: 'if (isValid) { console.log("Valid condition"); }', - }, - { - code: 'if (isValid && isEnabled) { console.log("Valid condition"); }', - }, - ], - invalid: [ - { - code: 'if (someValue) { console.log("Invalid condition"); }', - output: - 'if (isNonNullable(someValue)) { console.log("Invalid condition"); }', - errors: [ - { - messageId: 'nonExplicitPredicate', - data: { - actualText: 'someValue', - expectedText: 'isNonNullable(someValue)', - }, - }, - ], - }, - ], -});