]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5626'
authorTom Hughes <tom@compton.nu>
Sun, 9 Feb 2025 15:02:14 +0000 (15:02 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 9 Feb 2025 15:02:14 +0000 (15:02 +0000)
.vscode/settings.json [new file with mode: 0644]
app/assets/javascripts/index/directions-endpoint.js
app/assets/javascripts/index/directions/fossgis_osrm.js
app/assets/javascripts/index/directions/fossgis_valhalla.js
app/assets/javascripts/index/directions/graphhopper.js
app/assets/javascripts/index/search.js
app/assets/javascripts/leaflet.share.js
config/initializers/eslint.rb [deleted file]
yarn.lock

diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644 (file)
index 0000000..8a3d341
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "eslint.options": {
+    "overrideConfigFile": "config/eslint.js"
+  }
+}
index 3fdae7c5413560139ada1e4150957d84523da2c5..11a70c62f051448f7b43e6d2a4b56c22902ccec9 100644 (file)
@@ -101,8 +101,8 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
   };
 
   function getGeocode() {
-    var viewbox = map.getBounds().toBBoxString(); // <sw lon>,<sw lat>,<ne lon>,<ne lat>
-    var geocodeUrl = OSM.NOMINATIM_URL + "search?q=" + encodeURIComponent(endpoint.value) + "&format=json&viewbox=" + viewbox;
+    const viewbox = map.getBounds().toBBoxString(), // <sw lon>,<sw lat>,<ne lon>,<ne lat>
+          geocodeUrl = OSM.NOMINATIM_URL + "search?" + new URLSearchParams({ q: endpoint.value, format: "json", viewbox });
 
     endpoint.geocodeRequest = $.getJSON(geocodeUrl, function (json) {
       delete endpoint.geocodeRequest;
@@ -123,8 +123,9 @@ OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, ch
   }
 
   function getReverseGeocode() {
-    var latlng = endpoint.latlng.clone();
-    var reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?lat=" + latlng.lat + "&lon=" + latlng.lng + "&format=json";
+    const latlng = endpoint.latlng.clone(),
+          { lat, lng } = latlng,
+          reverseGeocodeUrl = OSM.NOMINATIM_URL + "reverse?" + new URLSearchParams({ lat, lon: lng, format: "json" });
 
     endpoint.geocodeRequest = $.getJSON(reverseGeocodeUrl, function (json) {
       delete endpoint.geocodeRequest;
index bd44be6626c2a195eb81261eb503e7a8665406be..bb968f2da3c5594175d9fb72a2dc5299d4f2d87b 100644 (file)
 
 (function () {
   function FOSSGISOSRMEngine(id, vehicleType) {
-    var cachedHints = [];
+    let cachedHints = [];
+
+    function _processDirections(route) {
+      const INSTRUCTION_TEMPLATE = {
+        "continue": "continue",
+        "merge right": "merge_right",
+        "merge left": "merge_left",
+        "off ramp right": "offramp_right",
+        "off ramp left": "offramp_left",
+        "on ramp right": "onramp_right",
+        "on ramp left": "onramp_left",
+        "fork right": "fork_right",
+        "fork left": "fork_left",
+        "end of road right": "endofroad_right",
+        "end of road left": "endofroad_left",
+        "turn straight": "continue",
+        "turn slight right": "slight_right",
+        "turn right": "turn_right",
+        "turn sharp right": "sharp_right",
+        "turn uturn": "uturn",
+        "turn sharp left": "sharp_left",
+        "turn left": "turn_left",
+        "turn slight left": "slight_left",
+        "roundabout": "roundabout",
+        "rotary": "roundabout",
+        "exit roundabout": "exit_roundabout",
+        "exit rotary": "exit_roundabout",
+        "depart": "start",
+        "arrive": "destination"
+      };
+      const ICON_MAP = {
+        "continue": 0,
+        "merge right": 21,
+        "merge left": 20,
+        "off ramp right": 24,
+        "off ramp left": 25,
+        "on ramp right": 2,
+        "on ramp left": 6,
+        "fork right": 18,
+        "fork left": 19,
+        "end of road right": 22,
+        "end of road left": 23,
+        "turn straight": 0,
+        "turn slight right": 1,
+        "turn right": 2,
+        "turn sharp right": 3,
+        "turn uturn": 4,
+        "turn slight left": 5,
+        "turn left": 6,
+        "turn sharp left": 7,
+        "roundabout": 10,
+        "rotary": 10,
+        "exit roundabout": 10,
+        "exit rotary": 10,
+        "depart": 8,
+        "arrive": 14
+      };
+      function numToWord(num) {
+        return ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth"][num - 1];
+      }
+      function getManeuverId(maneuver) {
+        // special case handling
+        switch (maneuver.type) {
+          case "on ramp":
+          case "off ramp":
+          case "merge":
+          case "end of road":
+          case "fork":
+            return maneuver.type + " " + (maneuver.modifier.indexOf("left") >= 0 ? "left" : "right");
+          case "depart":
+          case "arrive":
+          case "roundabout":
+          case "rotary":
+          case "exit roundabout":
+          case "exit rotary":
+            return maneuver.type;
+          case "roundabout turn":
+          case "turn":
+            return "turn " + maneuver.modifier;
+            // for unknown types the fallback is turn
+          default:
+            return "turn " + maneuver.modifier;
+        }
+      }
 
-    return {
-      id: id,
-      creditline: "<a href=\"https://routing.openstreetmap.de/about.html\" target=\"_blank\">OSRM (FOSSGIS)</a>",
-      draggable: true,
+      const steps = route.legs.flatMap(
+        leg => leg.steps.map(function (step, idx) {
+          const maneuver_id = getManeuverId(step.maneuver);
 
-      _transformSteps: function (input_steps, line) {
-        var INSTRUCTION_TEMPLATE = {
-          "continue": "javascripts.directions.instructions.continue",
-          "merge right": "javascripts.directions.instructions.merge_right",
-          "merge left": "javascripts.directions.instructions.merge_left",
-          "off ramp right": "javascripts.directions.instructions.offramp_right",
-          "off ramp left": "javascripts.directions.instructions.offramp_left",
-          "on ramp right": "javascripts.directions.instructions.onramp_right",
-          "on ramp left": "javascripts.directions.instructions.onramp_left",
-          "fork right": "javascripts.directions.instructions.fork_right",
-          "fork left": "javascripts.directions.instructions.fork_left",
-          "end of road right": "javascripts.directions.instructions.endofroad_right",
-          "end of road left": "javascripts.directions.instructions.endofroad_left",
-          "turn straight": "javascripts.directions.instructions.continue",
-          "turn slight right": "javascripts.directions.instructions.slight_right",
-          "turn right": "javascripts.directions.instructions.turn_right",
-          "turn sharp right": "javascripts.directions.instructions.sharp_right",
-          "turn uturn": "javascripts.directions.instructions.uturn",
-          "turn sharp left": "javascripts.directions.instructions.sharp_left",
-          "turn left": "javascripts.directions.instructions.turn_left",
-          "turn slight left": "javascripts.directions.instructions.slight_left",
-          "roundabout": "javascripts.directions.instructions.roundabout",
-          "rotary": "javascripts.directions.instructions.roundabout",
-          "exit roundabout": "javascripts.directions.instructions.exit_roundabout",
-          "exit rotary": "javascripts.directions.instructions.exit_roundabout",
-          "depart": "javascripts.directions.instructions.start",
-          "arrive": "javascripts.directions.instructions.destination"
-        };
-        var ICON_MAP = {
-          "continue": 0,
-          "merge right": 21,
-          "merge left": 20,
-          "off ramp right": 24,
-          "off ramp left": 25,
-          "on ramp right": 2,
-          "on ramp left": 6,
-          "fork right": 18,
-          "fork left": 19,
-          "end of road right": 22,
-          "end of road left": 23,
-          "turn straight": 0,
-          "turn slight right": 1,
-          "turn right": 2,
-          "turn sharp right": 3,
-          "turn uturn": 4,
-          "turn slight left": 5,
-          "turn left": 6,
-          "turn sharp left": 7,
-          "roundabout": 10,
-          "rotary": 10,
-          "exit roundabout": 10,
-          "exit rotary": 10,
-          "depart": 8,
-          "arrive": 14
-        };
-        var numToWord = function (num) {
-          return ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth"][num - 1];
-        };
-        var transformed_steps = input_steps.map(function (step, idx) {
-          var maneuver_id;
-
-          // special case handling
-          switch (step.maneuver.type) {
-            case "on ramp":
-            case "off ramp":
-            case "merge":
-            case "end of road":
-            case "fork":
-              maneuver_id = step.maneuver.type + " " + (step.maneuver.modifier.indexOf("left") >= 0 ? "left" : "right");
-              break;
-            case "depart":
-            case "arrive":
-            case "roundabout":
-            case "rotary":
-            case "exit roundabout":
-            case "exit rotary":
-              maneuver_id = step.maneuver.type;
-              break;
-            case "roundabout turn":
-            case "turn":
-              maneuver_id = "turn " + step.maneuver.modifier;
-              break;
-              // for unknown types the fallback is turn
-            default:
-              maneuver_id = "turn " + step.maneuver.modifier;
-              break;
-          }
-          var template = INSTRUCTION_TEMPLATE[maneuver_id];
+          const instrPrefix = "javascripts.directions.instructions.";
+          let template = instrPrefix + INSTRUCTION_TEMPLATE[maneuver_id];
 
-          // convert lat,lng pairs to LatLng objects
-          var step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 }).map(function (a) { return L.latLng(a); });
-          // append step_geometry on line
-          Array.prototype.push.apply(line, step_geometry);
+          const step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 }).map(L.latLng);
 
-          var instText = "<b>" + (idx + 1) + ".</b> ";
-          var destinations = "<b>" + step.destinations + "</b>";
-          var namedRoad = true;
-          var name;
+          let instText = "<b>" + (idx + 1) + ".</b> ";
+          const destinations = "<b>" + step.destinations + "</b>";
+          let namedRoad = true;
+          let name;
 
           if (step.name && step.ref) {
             name = "<b>" + step.name + " (" + step.ref + ")</b>";
           } else if (step.ref) {
             name = "<b>" + step.ref + "</b>";
           } else {
-            name = I18n.t("javascripts.directions.instructions.unnamed");
+            name = I18n.t(instrPrefix + "unnamed");
             namedRoad = false;
           }
 
           } else if (step.maneuver.type.match(/^(rotary|roundabout)$/)) {
             if (step.maneuver.exit) {
               if (step.maneuver.exit <= 10) {
-                instText += I18n.t(template + "_with_exit_ordinal", { exit: I18n.t("javascripts.directions.instructions.exit_counts." + numToWord(step.maneuver.exit)), name: name });
+                instText += I18n.t(template + "_with_exit_ordinal", { exit: I18n.t(instrPrefix + "exit_counts." + numToWord(step.maneuver.exit)), name: name });
               } else {
                 instText += I18n.t(template + "_with_exit", { exit: step.maneuver.exit, name: name });
               }
               instText += I18n.t(template + "_without_exit", { name: name });
             }
           } else if (step.maneuver.type.match(/^(on ramp|off ramp)$/)) {
-            var params = {};
+            const params = {};
             if (step.exits && step.maneuver.type.match(/^(off ramp)$/)) params.exit = step.exits;
             if (step.destinations) params.directions = destinations;
             if (namedRoad) params.directions = name;
             instText += I18n.t(template + "_without_exit", { name: name });
           }
           return [[step.maneuver.location[1], step.maneuver.location[0]], ICON_MAP[maneuver_id], instText, step.distance, step_geometry];
-        });
+        })
+      );
 
-        return transformed_steps;
-      },
+      return {
+        line: steps.flatMap(step => step[4]),
+        steps,
+        distance: route.distance,
+        time: route.duration
+      };
+    }
+
+    return {
+      id: id,
+      creditline: "<a href=\"https://routing.openstreetmap.de/about.html\" target=\"_blank\">OSRM (FOSSGIS)</a>",
+      draggable: true,
 
       getRoute: function (points, callback) {
-        var params = [
+        const data = [
           { name: "overview", value: "false" },
           { name: "geometries", value: "polyline" },
           { name: "steps", value: true }
         ];
 
-
         if (cachedHints.length === points.length) {
-          params.push({ name: "hints", value: cachedHints.join(";") });
+          data.push({ name: "hints", value: cachedHints.join(";") });
         } else {
-        // invalidate cache
+          // invalidate cache
           cachedHints = [];
         }
 
-        var encoded_coords = points.map(function (p) {
-          return p.lng + "," + p.lat;
-        }).join(";");
-
-        var req_url = OSM.FOSSGIS_OSRM_URL + "routed-" + vehicleType + "/route/v1/driving/" + encoded_coords;
-
-        var onResponse = function (data) {
-          if (data.code !== "Ok") {
-            return callback(true);
-          }
-
-          cachedHints = data.waypoints.map(function (wp) {
-            return wp.hint;
-          });
-
-          var line = [];
-          var transformLeg = function (leg) {
-            return this._transformSteps(leg.steps, line);
-          };
-
-          var steps = [].concat.apply([], data.routes[0].legs.map(transformLeg.bind(this)));
-
-          callback(false, {
-            line: line,
-            steps: steps,
-            distance: data.routes[0].distance,
-            time: data.routes[0].duration
-          });
-        };
+        const req_path = "routed-" + vehicleType + "/route/v1/driving/" + points.map(p => p.lng + "," + p.lat).join(";");
 
         return $.ajax({
-          url: req_url,
-          data: params,
+          url: OSM.FOSSGIS_OSRM_URL + req_path,
+          data,
           dataType: "json",
-          success: onResponse.bind(this),
+          success: function (response) {
+            if (response.code !== "Ok") {
+              return callback(true);
+            }
+
+            cachedHints = response.waypoints.map(wp => wp.hint);
+            callback(false, _processDirections(response.routes[0]));
+          },
           error: function () {
             callback(true);
           }
index bc093fea47b642b2451b25fd0c3207eb74c2181b..bbccccb13d1d35ac514c534b7d4600e84908fdf8 100644 (file)
@@ -1,6 +1,6 @@
 (function () {
   function FOSSGISValhallaEngine(id, costing) {
-    var INSTR_MAP = [
+    const INSTR_MAP = [
       0, // kNone = 0;
       8, // kStart = 1;
       8, // kStartRight = 2;
       20 // kMergeLeft = 38;
     ];
 
+    function _processDirections(tripLegs) {
+      let line = [];
+      let steps = [];
+      let distance = 0;
+      let time = 0;
+
+      for (const leg of tripLegs) {
+        const legLine = L.PolylineUtil.decode(leg.shape, {
+          precision: 6
+        });
+
+        const legSteps = leg.maneuvers.map(function (manoeuvre, idx) {
+          const num = `<b>${idx + 1}.</b> `;
+          const lineseg = legLine
+            .slice(manoeuvre.begin_shape_index, manoeuvre.end_shape_index + 1)
+            .map(([lat, lng]) => ({ lat, lng }));
+          return [
+            lineseg[0],
+            INSTR_MAP[manoeuvre.type],
+            num + manoeuvre.instruction,
+            manoeuvre.length * 1000,
+            lineseg
+          ];
+        });
+
+        line = line.concat(legLine);
+        steps = steps.concat(legSteps);
+        distance += leg.summary.length;
+        time += leg.summary.time;
+      }
+
+      return {
+        line: line,
+        steps: steps,
+        distance: distance * 1000,
+        time: time
+      };
+    }
+
     return {
       id: id,
       creditline:
       draggable: false,
 
       getRoute: function (points, callback) {
+        const data = {
+          json: JSON.stringify({
+            locations: points.map(function (p) {
+              return { lat: p.lat, lon: p.lng, radius: 5 };
+            }),
+            costing: costing,
+            directions_options: {
+              units: "km",
+              language: I18n.currentLocale()
+            }
+          })
+        };
         return $.ajax({
           url: OSM.FOSSGIS_VALHALLA_URL,
-          data: {
-            json: JSON.stringify({
-              locations: points.map(function (p) {
-                return { lat: p.lat, lon: p.lng, radius: 5 };
-              }),
-              costing: costing,
-              directions_options: {
-                units: "km",
-                language: I18n.currentLocale()
-              }
-            })
-          },
+          data,
           dataType: "json",
-          success: function (data) {
-            var trip = data.trip;
-
+          success: function ({ trip }) {
             if (trip.status === 0) {
-              var line = [];
-              var steps = [];
-              var distance = 0;
-              var time = 0;
-
-              trip.legs.forEach(function (leg) {
-                var legLine = L.PolylineUtil.decode(leg.shape, {
-                  precision: 6
-                });
-
-                line = line.concat(legLine);
-
-                leg.maneuvers.forEach(function (manoeuvre, idx) {
-                  var point = legLine[manoeuvre.begin_shape_index];
-
-                  steps.push([
-                    { lat: point[0], lng: point[1] },
-                    INSTR_MAP[manoeuvre.type],
-                    "<b>" + (idx + 1) + ".</b> " + manoeuvre.instruction,
-                    manoeuvre.length * 1000,
-                    []
-                  ]);
-                });
-
-                distance = distance + leg.summary.length;
-                time = time + leg.summary.time;
-              });
-
-              callback(false, {
-                line: line,
-                steps: steps,
-                distance: distance * 1000,
-                time: time
-              });
+              callback(false, _processDirections(trip.legs));
             } else {
               callback(true);
             }
index 021fc7b64de26961f749e11c21290fc198eb7c4c..19147587303b69b079fbc3792c526a64b6f0193a 100644 (file)
@@ -1,6 +1,6 @@
 (function () {
   function GraphHopperEngine(id, vehicleType) {
-    var GH_INSTR_MAP = {
+    const GH_INSTR_MAP = {
       "-3": 7, // sharp left
       "-2": 6, // left
       "-1": 5, // slight left
       "8": 4 // right u-turn
     };
 
+    function _processDirections(path) {
+      const line = L.PolylineUtil.decode(path.points);
+
+      const steps = path.instructions.map(function (instr, i) {
+        const num = `<b>${i + 1}.</b> `;
+        const lineseg = line
+          .slice(instr.interval[0], instr.interval[1] + 1)
+          .map(([lat, lng]) => ({ lat, lng }));
+        return [
+          lineseg[0],
+          GH_INSTR_MAP[instr.sign],
+          num + instr.text,
+          instr.distance,
+          lineseg
+        ]; // TODO does graphhopper map instructions onto line indices?
+      });
+      steps.at(-1)[1] = 14;
+
+      return {
+        line: line,
+        steps: steps,
+        distance: path.distance,
+        time: path.time / 1000,
+        ascend: path.ascend,
+        descend: path.descend
+      };
+    }
+
     return {
       id: id,
       creditline: "<a href=\"https://www.graphhopper.com/\" target=\"_blank\">GraphHopper</a>",
       draggable: false,
 
       getRoute: function (points, callback) {
-      // GraphHopper Directions API documentation
-      // https://graphhopper.com/api/1/docs/routing/
+        // GraphHopper Directions API documentation
+        // https://graphhopper.com/api/1/docs/routing/
+        const data = {
+          vehicle: vehicleType,
+          locale: I18n.currentLocale(),
+          key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
+          elevation: false,
+          instructions: true,
+          turn_costs: vehicleType === "car",
+          point: points.map(p => p.lat + "," + p.lng)
+        };
         return $.ajax({
           url: OSM.GRAPHHOPPER_URL,
-          data: {
-            vehicle: vehicleType,
-            locale: I18n.currentLocale(),
-            key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
-            elevation: false,
-            instructions: true,
-            turn_costs: vehicleType === "car",
-            point: points.map(function (p) { return p.lat + "," + p.lng; })
-          },
+          data,
           traditional: true,
           dataType: "json",
-          success: function (data) {
-            if (!data.paths || data.paths.length === 0) {
+          success: function ({ paths }) {
+            if (!paths || paths.length === 0) {
               return callback(true);
             }
-
-            var path = data.paths[0];
-            var line = L.PolylineUtil.decode(path.points);
-
-            var steps = [];
-            var len = path.instructions.length;
-            for (var i = 0; i < len; i++) {
-              var instr = path.instructions[i];
-              var instrCode = (i === len - 1) ? 14 : GH_INSTR_MAP[instr.sign];
-              var instrText = "<b>" + (i + 1) + ".</b> ";
-              instrText += instr.text;
-              var latLng = line[instr.interval[0]];
-              var distInMeter = instr.distance;
-              var lineseg = [];
-              for (var j = instr.interval[0]; j <= instr.interval[1]; j++) {
-                lineseg.push({ lat: line[j][0], lng: line[j][1] });
-              }
-              steps.push([
-                { lat: latLng[0], lng: latLng[1] },
-                instrCode,
-                instrText,
-                distInMeter,
-                lineseg
-              ]); // TODO does graphhopper map instructions onto line indices?
-            }
-
-            callback(false, {
-              line: line,
-              steps: steps,
-              distance: path.distance,
-              time: path.time / 1000,
-              ascend: path.ascend,
-              descend: path.descend
-            });
+            callback(false, _processDirections(paths[0]));
           },
           error: function () {
             callback(true);
index e54c5132c65ab4dca495aa72bfc9ed380718df7b..23af46145b0ae9295870bce53e778a31a93d87de 100644 (file)
@@ -10,22 +10,18 @@ OSM.Search = function (map) {
   $(".search_form a.btn.switch_link").on("click", function (e) {
     e.preventDefault();
     var query = $(this).closest("form").find("input[name=query]").val();
-    if (query) {
-      OSM.router.route("/directions?from=" + encodeURIComponent(query) + OSM.formatHash(map));
-    } else {
-      OSM.router.route("/directions" + OSM.formatHash(map));
-    }
+    let search = "";
+    if (query) search = "?" + new URLSearchParams({ from: query });
+    OSM.router.route("/directions" + search + OSM.formatHash(map));
   });
 
   $(".search_form").on("submit", function (e) {
     e.preventDefault();
     $("header").addClass("closed");
     var query = $(this).find("input[name=query]").val();
-    if (query) {
-      OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
-    } else {
-      OSM.router.route("/" + OSM.formatHash(map));
-    }
+    let search = "/";
+    if (query) search = "/search?" + new URLSearchParams({ query });
+    OSM.router.route(search + OSM.formatHash(map));
   });
 
   $(".describe_location").on("click", function (e) {
index 7d8462f4614662c20900595ff23f891ec7b008da..e89608afda7dce94c127d208942be2ee9083c91e 100644 (file)
@@ -349,14 +349,14 @@ L.OSM.share = function (options) {
       $("#short_link").attr("href", map.getShortUrl(marker));
       $("#long_link").attr("href", map.getUrl(marker));
 
-      var params = {
+      const params = new URLSearchParams({
         bbox: bounds.toBBoxString(),
         layer: map.getMapBaseLayerId()
-      };
+      });
 
       if (map.hasLayer(marker)) {
         var latLng = marker.getLatLng().wrap();
-        params.marker = latLng.lat + "," + latLng.lng;
+        params.set("marker", latLng.lat + "," + latLng.lng);
       }
 
       $("#embed_link")
@@ -369,7 +369,7 @@ L.OSM.share = function (options) {
 
       $("#embed_html").val(
         "<iframe width=\"425\" height=\"350\" src=\"" +
-          escapeHTML(OSM.SERVER_PROTOCOL + "://" + OSM.SERVER_URL + "/export/embed.html?" + $.param(params)) +
+          escapeHTML(OSM.SERVER_PROTOCOL + "://" + OSM.SERVER_URL + "/export/embed.html?" + params) +
           "\" style=\"border: 1px solid black\"></iframe><br/>" +
           "<small><a href=\"" + escapeHTML(map.getUrl(marker)) + "\">" +
           escapeHTML(I18n.t("javascripts.share.view_larger_map")) + "</a></small>");
diff --git a/config/initializers/eslint.rb b/config/initializers/eslint.rb
deleted file mode 100644 (file)
index 9ddf491..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-if defined?(ESLintRails::Runner)
-  module OpenStreetMap
-    module ESLintRails
-      module ExcludeI18n
-        def assets
-          super.reject { |a| a.to_s.include?("/i18n/") }
-        end
-      end
-    end
-  end
-
-  ESLintRails::Runner.prepend(OpenStreetMap::ESLintRails::ExcludeI18n)
-end
index c15c97e29b3c446b7835d4e34d130e056b94bc7b..902fdb90605625ba1d8243d016410cbef207b0e7 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
   dependencies:
     "@types/json-schema" "^7.0.15"
 
+"@eslint/core@^0.11.0":
+  version "0.11.0"
+  resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.11.0.tgz#7a9226e850922e42cbd2ba71361eacbe74352a12"
+  integrity sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA==
+  dependencies:
+    "@types/json-schema" "^7.0.15"
+
 "@eslint/eslintrc@^3.2.0":
   version "3.2.0"
   resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c"
     minimatch "^3.1.2"
     strip-json-comments "^3.1.1"
 
-"@eslint/js@9.19.0":
-  version "9.19.0"
-  resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.19.0.tgz#51dbb140ed6b49d05adc0b171c41e1a8713b7789"
-  integrity sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==
+"@eslint/js@9.20.0":
+  version "9.20.0"
+  resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.20.0.tgz#7421bcbe74889fcd65d1be59f00130c289856eb4"
+  integrity sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==
 
 "@eslint/object-schema@^2.1.4":
   version "2.1.4"
@@ -249,16 +256,16 @@ eslint-visitor-keys@^4.2.0:
   integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==
 
 eslint@^9.0.0:
-  version "9.19.0"
-  resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.19.0.tgz#ffa1d265fc4205e0f8464330d35f09e1d548b1bf"
-  integrity sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==
+  version "9.20.0"
+  resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.20.0.tgz#6244c46c1640cd5e577a31ebc460fca87838c0b7"
+  integrity sha512-aL4F8167Hg4IvsW89ejnpTwx+B/UQRzJPGgbIOl+4XqffWsahVVsLEWoZvnrVuwpWmnRd7XeXmQI1zlKcFDteA==
   dependencies:
     "@eslint-community/eslint-utils" "^4.2.0"
     "@eslint-community/regexpp" "^4.12.1"
     "@eslint/config-array" "^0.19.0"
-    "@eslint/core" "^0.10.0"
+    "@eslint/core" "^0.11.0"
     "@eslint/eslintrc" "^3.2.0"
-    "@eslint/js" "9.19.0"
+    "@eslint/js" "9.20.0"
     "@eslint/plugin-kit" "^0.2.5"
     "@humanfs/node" "^0.16.6"
     "@humanwhocodes/module-importer" "^1.0.1"