Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/5614'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Feb 6, 2025
2 parents 0488e66 + eee793f commit 6f9dfc6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/assets/javascripts/edit/id.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
});
}
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/index/directions-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion config/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 6f9dfc6

Please sign in to comment.