Skip to content

Commit

Permalink
[ESLint] enable no-var rule (#3041)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina authored Apr 14, 2023
1 parent a4535ef commit b901d61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ module.exports = {
'sonarjs/no-unused-collection': 'error',
'sonarjs/no-extra-arguments': 'error',
'unicorn/no-useless-undefined': 'error',
'no-var': 'error',
// Strict Mode (http://eslint.org/docs/rules/#strict-mode)
strict: 0,

Expand Down
6 changes: 3 additions & 3 deletions packages/graphiql/resources/renderExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/

// Parse the search string to get url parameters.
var parameters = {};
const parameters = {};
for (const entry of window.location.search.slice(1).split('&')) {
var eq = entry.indexOf('=');
const eq = entry.indexOf('=');
if (eq >= 0) {
parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent(
entry.slice(eq + 1),
Expand Down Expand Up @@ -49,7 +49,7 @@ function onTabChange(tabsState) {
}

function updateURL() {
var newSearch =
const newSearch =
'?' +
Object.keys(parameters)
.filter(function (key) {
Expand Down

0 comments on commit b901d61

Please sign in to comment.