From 318433b2d8916b2971e2c7333ded1cc89f21abfd Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Tue, 6 Aug 2024 18:36:25 +0200 Subject: [PATCH] Enable the `unicorn/throw-new-error` linting rule For more information refer to https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md. This didn't require any changes because we already do this correctly, but it ensures that new code remains consistent and explicit. --- .eslintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc b/.eslintrc index 2b2d0a580c023..e942b58f34626 100644 --- a/.eslintrc +++ b/.eslintrc @@ -79,6 +79,7 @@ "unicorn/prefer-string-replace-all": "error", "unicorn/prefer-string-starts-ends-with": "error", "unicorn/prefer-ternary": ["error", "only-single-line"], + "unicorn/throw-new-error": "error", // Possible errors "for-direction": "error",