[eslint] Enable yoda and eqeqeq

This commit is contained in:
Louis Lam
2022-04-17 15:43:03 +08:00
parent d71c086447
commit 47c72192e1
19 changed files with 41 additions and 39 deletions

View File

@@ -46,11 +46,11 @@ class Alerta extends NotificationProvider {
resource: monitorJSON["name"],
}, data );
if (heartbeatJSON["status"] == DOWN) {
if (heartbeatJSON["status"] === DOWN) {
datadup.severity = notification.alertaAlertState; // critical
datadup.text = "Service " + monitorJSON["type"] + " is down.";
await axios.post(alertaUrl, datadup, config);
} else if (heartbeatJSON["status"] == UP) {
} else if (heartbeatJSON["status"] === UP) {
datadup.severity = notification.alertaRecoverState; // cleaned
datadup.text = "Service " + monitorJSON["type"] + " is up.";
await axios.post(alertaUrl, datadup, config);