Skip to content

Commit

Permalink
Update lint ignore statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Aug 8, 2024
1 parent a38d452 commit 10155d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/geolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ export class Geolocation {
if (Number.isFinite(timeoutDelay)) {
timeoutTask = new Promise<never>((_resolve, reject) => {
timeoutId = setTimeout(() => {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(GeolocationPositionError.TIMEOUT);
}, timeoutDelay);
});
Expand Down Expand Up @@ -385,6 +386,7 @@ export class Geolocation {
* 2. (cont.)
* 2. Do the user or system denied permission failure case step.
*/
// eslint-disable-next-line @typescript-eslint/only-throw-error
throw GeolocationPositionError.PERMISSION_DENIED;
}

Expand Down Expand Up @@ -468,6 +470,7 @@ export class Geolocation {
* 2. Go to dealing with failures.
* 3. Terminate this algorithm.
*/
// eslint-disable-next-line @typescript-eslint/only-throw-error
throw GeolocationPositionError.POSITION_UNAVAILABLE;
}
})(),
Expand All @@ -478,6 +481,7 @@ export class Geolocation {
if (descriptor.name !== "geolocation") return;
if (toState === "granted") return;

// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(GeolocationPositionError.PERMISSION_DENIED);
unsubscribePermission();
},
Expand Down
1 change: 1 addition & 0 deletions test/wait-for.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function waitFor<T>(fn: () => T): Promise<T> {

if (elapsed >= timeout) {
clearInterval(intervalId);
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(error ?? new Error("Timed out"));
}
}, delay);
Expand Down

0 comments on commit 10155d3

Please sign in to comment.