Migrated to ESLint

This commit is contained in:
squidfunk
2021-02-07 17:43:13 +01:00
parent 4744d5f3f0
commit 208c9ac3fd
65 changed files with 1968 additions and 393 deletions

View File

@@ -34,7 +34,7 @@ import { BehaviorSubject, Subject } from "rxjs"
* tracked without setting them and `Location` is a singleton which represents
* the current location.
*
* @return URL
* @returns URL
*/
export function getLocation(): URL {
return new URL(location.href)
@@ -54,7 +54,7 @@ export function setLocation(url: URL): void {
/**
* Watch location
*
* @return Location subject
* @returns Location subject
*/
export function watchLocation(): Subject<URL> {
return new BehaviorSubject<URL>(getLocation())

View File

@@ -23,8 +23,7 @@
import { Observable, fromEvent, of } from "rxjs"
import { filter, map, share, startWith, switchMap } from "rxjs/operators"
import { createElement } from "browser"
import { getElement } from "~/browser/element"
import { createElement, getElement } from "~/browser"
/* ----------------------------------------------------------------------------
* Functions
@@ -33,7 +32,7 @@ import { getElement } from "~/browser/element"
/**
* Retrieve location hash
*
* @return Location hash
* @returns Location hash
*/
export function getLocationHash(): string {
return location.hash.substring(1)
@@ -61,7 +60,7 @@ export function setLocationHash(hash: string): void {
/**
* Watch location hash
*
* @return Location hash observable
* @returns Location hash observable
*/
export function watchLocationHash(): Observable<string> {
return fromEvent<HashChangeEvent>(window, "hashchange")
@@ -76,7 +75,7 @@ export function watchLocationHash(): Observable<string> {
/**
* Watch location target
*
* @return Location target observable
* @returns Location target observable
*/
export function watchLocationTarget(): Observable<HTMLElement> {
return watchLocationHash()