From: Tom Hughes Date: Thu, 6 Feb 2025 17:19:32 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5614' X-Git-Tag: live~324 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6f9dfc667bfd2d4ac0d14f061dc2e29b2bde7f19?hp=0488e66d4c10100ff62d816beb84fe83da50674c Merge remote-tracking branch 'upstream/pull/5614' --- diff --git a/app/assets/javascripts/edit/id.js.erb b/app/assets/javascripts/edit/id.js.erb index 3af6fd3dc..588aa1e86 100644 --- a/app/assets/javascripts/edit/id.js.erb +++ b/app/assets/javascripts/edit/id.js.erb @@ -2,6 +2,7 @@ $(document).ready(function () { const id = $("#id-embed"); if (id.data("configured") === false) { + // eslint-disable-next-line no-alert alert(I18n.t("site.edit.id_not_configured")); return; } diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 8ef067740..4555553ee 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -255,6 +255,7 @@ $(document).ready(function () { fetch(url, { mode: "no-cors", signal: AbortSignal.timeout(5000) }) .then(callback) .catch(function () { + // eslint-disable-next-line no-alert alert(I18n.t("site.index.remote_failed")); }); } diff --git a/app/assets/javascripts/index/directions-endpoint.js b/app/assets/javascripts/index/directions-endpoint.js index 30d499ad7..3fdae7c54 100644 --- a/app/assets/javascripts/index/directions-endpoint.js +++ b/app/assets/javascripts/index/directions-endpoint.js @@ -108,6 +108,7 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch delete endpoint.geocodeRequest; if (json.length === 0) { input.addClass("is-invalid"); + // eslint-disable-next-line no-alert alert(I18n.t("javascripts.directions.errors.no_place", { place: endpoint.value })); return; } diff --git a/config/eslint.js b/config/eslint.js index cb421a992..f70cbc6c0 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -86,7 +86,7 @@ module.exports = [ "curly": ["error", "multi-line", "consistent"], "dot-notation": "error", "eqeqeq": ["error", "smart"], - "no-alert": "warn", + "no-alert": "error", "no-array-constructor": "error", "no-caller": "error", "no-console": "warn",