Skip to content

Commit

Permalink
enable prefer-arrow-callback (#3282)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina authored Jun 24, 2023
1 parent 27ef6ec commit 47e673d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ module.exports = {
'no-useless-computed-key': 'error',
'no-useless-constructor': 'off',
'no-useless-rename': 'error',
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'object-shorthand': [
'error',
'always',
{ avoidExplicitReturnArrows: true },
],
'prefer-arrow-callback': ['off', { allowNamedFunctions: true }], // prettier --list-different
'prefer-numeric-literals': 'off',
'prefer-template': 'off',
'sort-imports': 'off',
Expand Down
21 changes: 8 additions & 13 deletions packages/graphiql/resources/renderExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,14 @@ function onTabChange(tabsState) {
}

function updateURL() {
const newSearch =
'?' +
Object.keys(parameters)
.filter(function (key) {
return Boolean(parameters[key]);
})
.map(function (key) {
return (
encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key])
);
})
.join('&');
history.replaceState(null, null, newSearch);
const newSearch = Object.entries(parameters)
.filter(([_key, value]) => value)
.map(
([key, value]) =>
encodeURIComponent(key) + '=' + encodeURIComponent(value),
)
.join('&');
history.replaceState(null, null, `?${newSearch}`);
}

function getSchemaUrl() {
Expand Down

0 comments on commit 47e673d

Please sign in to comment.