From 9a885e821e8904e0c9964ae1e00c953201a06b7d Mon Sep 17 00:00:00 2001 From: dw-0 Date: Sat, 26 Oct 2024 09:58:43 +0200 Subject: [PATCH] Feature/switch prefer-function-type eslint rule from warn to error (#3981) * Switch prefer-function-type eslint rule from warn to error * Update changelog --------- Signed-off-by: Dominik Willner --- .eslintrc.json | 1 - CHANGELOG.md | 1 + apps/client/src/app/util/form.util.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index a66ee6f02..445d2d477 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -142,7 +142,6 @@ // The following rules are part of @typescript-eslint/stylistic-type-checked // and can be remove once solved - "@typescript-eslint/prefer-function-type": "warn", "@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true "@typescript-eslint/consistent-type-assertions": "warn", "@typescript-eslint/prefer-optional-chain": "warn", diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f39882a2..c4953202b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Switched the `consistent-type-definitions` rule from `warn` to `error` in the `eslint` configuration - Switched the `no-empty-function` rule from `warn` to `error` in the `eslint` configuration +- Switched the `prefer-function-type` rule from `warn` to `error` in the `eslint` configuration ### Fixed diff --git a/apps/client/src/app/util/form.util.ts b/apps/client/src/app/util/form.util.ts index f629cc4a2..425aa4699 100644 --- a/apps/client/src/app/util/form.util.ts +++ b/apps/client/src/app/util/form.util.ts @@ -8,7 +8,7 @@ export async function validateObjectForForm({ ignoreFields = [], object }: { - classDto: { new (): T }; + classDto: new () => T; form: FormGroup; ignoreFields?: string[]; object: T;