<p dir="auto">This updates the eslint config to prohibit use of <code class="notranslate">var</code> and to prefer <code class="notranslate">const</code> over <code class="notranslate">let</code> and then fixes all uses of <code class="notranslate">var</code> to respect that.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5558'>https://github.com/openstreetmap/openstreetmap-website/pull/5558</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/commits/f728729a47ca4ddc8f112feecf674951f9e6f497" class="commit-link">f728729</a> Update eslint to prefer let/const over var</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/commits/9fdc0ce98bd0af49f748a1a991c8c768ef04e3d3" class="commit-link">9fdc0ce</a> Replace uses of var with let or const as appropriate</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files">39 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-0e145ba000e96b1a45d230275e350e4e8514efb4db7dbcfa228fe1003896c9b4">app/assets/javascripts/application.js</a>
(33)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-4218c327342777c9de158b4e68cf4c6ef8e5b10cbb8f6aaf4944705d221821ab">app/assets/javascripts/auth_providers.js</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-01d803186412f226455170ecc092c9a0ba9251eb06d82f7e22a3c118582dcb61">app/assets/javascripts/diary_entry.js</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-e0ef273df85202fcc1038701c3bbf3126b9a982b4722db953d75abb2d9cd9e31">app/assets/javascripts/fixthemap.js</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-e37bc574e30721f9d7464e669f8c8224398df640a8b215071b41ee3803fc6eaf">app/assets/javascripts/id.js</a>
(22)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-cdc070ced1c4000efd1e28357fd26b2fd617d7fccfeae0324222231db75dd6ee">app/assets/javascripts/index.js</a>
(60)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-e8b0bd562b0aaead17e44d572d51fcc72fa846c7b54ae5df2dc6434fb80834dc">app/assets/javascripts/index/changeset.js</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-3e81b28faf8dfac2dcfdc2454ed4d17ee7b60abfb774f5ea00ed38799e624798">app/assets/javascripts/index/contextmenu.js</a>
(42)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-720e11d91a0c3a64a70dd6bfad46c242e9f4755b2470797031de5b55ff9a8c5d">app/assets/javascripts/index/directions-endpoint.js</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-fdb9558c2ba79ddf9fbcb92594a8a8fa54abb1b3e25ce264de37951b428a958b">app/assets/javascripts/index/directions.js</a>
(96)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-7e2536f2e9b6f209b368993e27a7ecbb60869fc394321af9c2d735c8c02e8fa9">app/assets/javascripts/index/directions/fossgis_osrm.js</a>
(40)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-a9cecd581b2c9e4e43ee8e0b73ee178a13779019da8bcb9c13d209843c716711">app/assets/javascripts/index/directions/fossgis_valhalla.js</a>
(16)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-ef6651e3e37e12a6ee24e6c9efaa98ddd129a20a5631401cea6e0642fcfffb7a">app/assets/javascripts/index/directions/graphhopper.js</a>
(26)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-32bd60500bca8422d3edba93ac86b6d6a12190fdee53ce75372dc501efcba010">app/assets/javascripts/index/export.js</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-25cab16df4a58e0c8e53d0a0e70d9bbf28ef3beb9e6bf1208234fdeed7515392">app/assets/javascripts/index/history.js</a>
(42)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-ef1a25386d3acf1a86026dcc1edba5a3ec22fc64053d657cb1564b25129475c6">app/assets/javascripts/index/layers/data.js</a>
(16)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-8058f2f9c608b200098c52a855b78588f6b3aedce1b96c0fa57b706fa2d9e81c">app/assets/javascripts/index/layers/notes.js</a>
(22)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-08fd2f80528286cf96375b12d81cac98954dee8e6a6899f5f261a127861fdd49">app/assets/javascripts/index/new_note.js</a>
(20)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-8f18485b763264500054435af432745e2a51b4402140728dc4df89024768b71b">app/assets/javascripts/index/note.js</a>
(26)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-8275a6df0995b2af17f0b52a0dfe5a00f8b09d9d51b89516e2612a3faa9d8c0f">app/assets/javascripts/index/query.js</a>
(111)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-8859067d4860f7b3d870155d8af8c81e89fd7c66cd2ebb58bd42cf31005c3c27">app/assets/javascripts/index/search.js</a>
(56)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-08a7ab143240d1f24d2cfc6f105ae9a1d8bc7fc5d1b95a280cb8a76180e93397">app/assets/javascripts/leaflet.key.js</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-87e33ea7d5e625dd851a78a3192719681de20caea8edd278a10f5342585c98e7">app/assets/javascripts/leaflet.layers.js</a>
(34)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-ef904513ab8e3a540684b17be0d864902b298358d2785884b21db95d675e7d08">app/assets/javascripts/leaflet.locate.js</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-f060eef487077b042f45b3a12e7a2cbd54a446f8c744cdb98405a1295430e8b9">app/assets/javascripts/leaflet.map.js</a>
(89)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-ffadccc633e42804425bc8e2e023dc83e8fd879d1910165d2d41c11b76c78b4d">app/assets/javascripts/leaflet.note.js</a>
(10)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-d90520fa15051d9e115e9851d472a8ce787aef5ec6bc846c580dd24bf2ee0c81">app/assets/javascripts/leaflet.query.js</a>
(10)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-e15f8139afbbcbe98b89298674e7980a4a4500dbc54a431e1325a11adfe83f83">app/assets/javascripts/leaflet.share.js</a>
(60)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-c4925852e0efd740fa9486b55efb267e4d1f1984fcdcd3125c5d1784b7a0f7a1">app/assets/javascripts/leaflet.sidebar-pane.js</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-47fdb48f632a18a6f55b9db0d4e0b134a4019bd2d0380436fc53e3a4ae0e2604">app/assets/javascripts/leaflet.sidebar.js</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-1cfdad7fb0cfff4218a71bd8d7cefa72e25433d98fdefdcec4c186560c89e853">app/assets/javascripts/leaflet.zoom.js</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-b4ab8abdaadce7c3669db5cab989cc982c840ee387ce65a755d0a0ef859097cf">app/assets/javascripts/matomo.js</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-48f265e3c1234dccb131446d41a69924f45a2cc9ea35022cbd1fe4533114ec26">app/assets/javascripts/oauth.js</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-0d7657292b610e8871d2d00d8468108ac06888d1033743b7e645dc87e9bfec71">app/assets/javascripts/richtext.js</a>
(24)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-3635093596ec53c4cebe7c2263939a5b01c8b9c71462506873f73af8429cabbc">app/assets/javascripts/router.js</a>
(44)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-6bf5e2b503c6238cb80234a21524267bec1b1a820855412a5795c6296f11cb89">app/assets/javascripts/user.js</a>
(46)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-b84ee037ee4159b0b5331506806797468159d9962a0640ad27cc474e7c8b6a77">app/assets/javascripts/welcome.js</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-96200efa07e00ed1e99917b67033ff3c54a932520a4dcb9939217a0e2fe1fa8b">config/eslint.js</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558/files#diff-94f48fb5b77f2e9e4d66ccbe5276b249c97182801b5213c866b744316d737a9f">test/javascripts/osm_test.js</a>
(44)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5558.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5558.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5558.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5558.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5558">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLKNDM2S4XTKY2HXND2MUXLDAVCNFSM6AAAAABV4XERTGVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYTCNZTGY4DIMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLP3EQU73CEI5DFLDST2MUXLDA5CNFSM6AAAAABV4XERTGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKPF5TBA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5558</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5558",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5558",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>