Update typescript, prettier, tslint -> eslint (#5536)

* Update typescript, prettier, tslint -> eslint

* Organize imports

* Use glob for eslint fix react import
This commit is contained in:
Bram Kragten
2020-04-14 18:05:45 +02:00
committed by GitHub
parent b17490f0de
commit 82f80db558
737 changed files with 9408 additions and 7414 deletions

View File

@@ -9,23 +9,17 @@ declare global {
}
}
export const navigate = (
_node: any,
path: string,
replace: boolean = false
) => {
export const navigate = (_node: any, path: string, replace = false) => {
if (__DEMO__) {
if (replace) {
history.replaceState(null, "", `${location.pathname}#${path}`);
} else {
window.location.hash = path;
}
} else if (replace) {
history.replaceState(null, "", path);
} else {
if (replace) {
history.replaceState(null, "", path);
} else {
history.pushState(null, "", path);
}
history.pushState(null, "", path);
}
fireEvent(window, "location-changed", {
replace,