mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-12-05 01:10:52 +00:00
Enforce no-throw-literal rule in ESLint (#6418)
This commit is contained in:
@@ -78,6 +78,7 @@ module.exports = {
|
||||
"keyword-spacing": "warn",
|
||||
"space-infix-ops": "error",
|
||||
"arrow-spacing": "warn",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-constant-condition": [ "error", {
|
||||
"checkLoops": false,
|
||||
|
||||
@@ -51,7 +51,7 @@ class Webhook extends NotificationProvider {
|
||||
...JSON.parse(notification.webhookAdditionalHeaders)
|
||||
};
|
||||
} catch (err) {
|
||||
throw "Additional Headers is not a valid JSON";
|
||||
throw new Error("Additional Headers is not a valid JSON");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user