Skip to content

Commit 099bb49

Browse files
committed
Lint fixes
1 parent 0f113e5 commit 099bb49

16 files changed

+35
-35
lines changed

src/aggregateerror.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ export class AggregateError extends Error {
77
Object.defineProperty(this, 'errors', {
88
value: Array.from(errors),
99
configurable: true,
10-
writable: true
10+
writable: true,
1111
})
1212
if (options.cause) {
1313
Object.defineProperty(this, 'cause', {
1414
value: options.cause,
1515
configurable: true,
16-
writable: true
16+
writable: true,
1717
})
1818
}
1919
}

src/array-findlast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function arrayFindLast<T>(
22
this: T[],
33
pred: (this: T[], value: T, i: number, array: T[]) => boolean,
4-
recv = this
4+
recv = this,
55
): T | void {
66
for (let i = this.length - 1; i >= 0; i -= 1) {
77
if (pred.call(recv, this[i], i, this)) return this[i]

src/array-findlastindex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function arrayFindLastIndex<T>(
22
this: T[],
33
pred: (this: T[], value: T, i: number, array: T[]) => boolean,
4-
recv = this
4+
recv = this,
55
): number {
66
for (let i = this.length - 1; i >= 0; i -= 1) {
77
if (pred.call(recv, this[i], i, this)) return i
@@ -24,7 +24,7 @@ export function apply(): void {
2424
const defn = {
2525
value: arrayFindLastIndex,
2626
writable: true,
27-
configurable: true
27+
configurable: true,
2828
}
2929
Object.defineProperty(Array.prototype, 'findLastIndex', defn)
3030
}

src/event-abortsignal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export function addEventListenerWithAbortSignal(
33
this: EventTarget,
44
type: string,
55
callback: EventListenerOrEventListenerObject | null,
6-
options?: AddEventListenerOptions | boolean
6+
options?: AddEventListenerOptions | boolean,
77
): void {
88
if (typeof options === 'object' && 'signal' in options && options.signal instanceof AbortSignal) {
99
if (options.signal.aborted) return
@@ -23,7 +23,7 @@ declare global {
2323
export function isSupported(): boolean {
2424
let signalSupported = false
2525
const setSignalSupported = () => (signalSupported = true)
26-
// eslint-disable-next-line @typescript-eslint/no-empty-function
26+
2727
function noop() {}
2828
const options = Object.create({}, {signal: {get: setSignalSupported}})
2929
try {

src/form-requestsubmit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function requestSubmit(
22
this: HTMLFormElement,
3-
submitter: HTMLButtonElement | HTMLInputElement | null = null
3+
submitter: HTMLButtonElement | HTMLInputElement | null = null,
44
): void {
55
const event = new SubmitEvent('submit', {bubbles: true, cancelable: true, submitter})
66
let input
@@ -9,7 +9,7 @@ export function requestSubmit(
99
type: 'hidden',
1010
hidden: true,
1111
name: submitter.name,
12-
value: submitter.value
12+
value: submitter.value,
1313
})
1414
this.append(input)
1515
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const polyfills = {
7474
requestIdleCallback,
7575
stringReplaceAll,
7676
arrayFindLast,
77-
arrayFindLastIndex
77+
arrayFindLastIndex,
7878
}
7979

8080
export function isSupported() {

src/object-hasown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function apply(): void {
2727
Object.defineProperty(Object, 'hasOwn', {
2828
value: objectHasOwn,
2929
configurable: true,
30-
writable: true
30+
writable: true,
3131
})
3232
}
3333
}

src/promise-allsettled.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export function promiseAllSettled<T extends readonly unknown[] | []>(
2-
values: T
2+
values: T,
33
): Promise<{-readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>}> {
44
return Promise.all(
55
values.map(p =>
66
// eslint-disable-next-line github/no-then
77
Promise.resolve(p).then(
88
(value: unknown) => ({status: 'fulfilled', value}),
9-
(reason: unknown) => ({status: 'rejected', reason})
10-
)
11-
)
9+
(reason: unknown) => ({status: 'rejected', reason}),
10+
),
11+
),
1212
) as unknown as Promise<{-readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>}>
1313
}
1414

src/requestidlecallback.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export function requestIdleCallback(callback: IdleRequestCallback, options: Idle
1313
didTimeout: false,
1414
timeRemaining() {
1515
return Math.max(0, maxDeadline - (Date.now() - start))
16-
}
16+
},
1717
},
1818
'didTimeout',
1919
{
2020
get() {
2121
return Date.now() - start > timeout
22-
}
23-
}
22+
},
23+
},
2424
)
2525
return window.setTimeout(() => {
2626
callback(deadline)

src/string-replaceall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export function stringReplaceAll(
22
this: string,
33
searchValue: RegExp | string,
4-
replaceValue: ((substring: string, ...args: unknown[]) => string) | string
4+
replaceValue: ((substring: string, ...args: unknown[]) => string) | string,
55
): string {
66
if (searchValue instanceof RegExp) return this.replace(searchValue, replaceValue as unknown as string)
77
let pos = -1

0 commit comments

Comments
 (0)