Skip to content

Commit eb72489

Browse files
armujahidCompuIves
authored andcommitted
fix eslint issues in url-listeners (codesandbox#2600)
* refactor(url-listeners): fix eslint issues historyPosition and historyList were used before their declaraion * refactor(url-listeners): remove unnecessary eslint-disable no-console
1 parent 07cff78 commit eb72489

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/sandbox-hooks/url-listeners.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { dispatch, isStandalone, listen } from 'codesandbox-api';
22

3+
const origHistoryProto = window.history.__proto__; // eslint-disable-line no-proto
4+
const historyList = [];
5+
let historyPosition = -1;
6+
let disableNextHashChange = false;
7+
38
function sendUrlChange(url) {
49
dispatch({
510
type: 'urlchange',
@@ -9,13 +14,6 @@ function sendUrlChange(url) {
914
});
1015
}
1116

12-
/* eslint-disable no-console */
13-
14-
const origHistoryProto = window.history.__proto__; // eslint-disable-line no-proto
15-
const historyList = [];
16-
let historyPosition = -1;
17-
let disableNextHashChange = false;
18-
1917
function pushHistory(url, state) {
2018
// remove "future" locations
2119
historyList.splice(historyPosition + 1);

0 commit comments

Comments
 (0)