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

@@ -7,7 +7,7 @@ export const isNavigationClick = (e: MouseEvent) => {
e.ctrlKey ||
e.shiftKey
) {
return;
return undefined;
}
const anchor = e
@@ -21,23 +21,23 @@ export const isNavigationClick = (e: MouseEvent) => {
anchor.hasAttribute("download") ||
anchor.getAttribute("rel") === "external"
) {
return;
return undefined;
}
let href = anchor.href;
if (!href || href.indexOf("mailto:") !== -1) {
return;
return undefined;
}
const location = window.location;
const origin = location.origin || location.protocol + "//" + location.host;
if (href.indexOf(origin) !== 0) {
return;
return undefined;
}
href = href.substr(origin.length);
if (href === "#") {
return;
return undefined;
}
e.preventDefault();