Skip to content

Commit ce60323

Browse files
committed
style: lint
1 parent ac1de68 commit ce60323

43 files changed

Lines changed: 58 additions & 68 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/stage-pocket/src/components/DataGui/DualEndRange.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const sortedValues = computed(() => {
7373
7474
const sliderStyle = computed(() => {
7575
const sliderOffset = valueToPercent(sortedValues.value[0], props.min, props.max)
76-
const sliderLeap = valueToPercent(sortedValues.value[sortedValues.value.length - 1], props.min, props.max) - sliderOffset
76+
const sliderLeap = valueToPercent(sortedValues.value.at(-1), props.min, props.max) - sliderOffset
7777
return {
7878
left: `${sliderOffset}%`,
7979
width: `${sliderLeap}%`,

apps/stage-pocket/src/pages/devtools/background-removal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function downloadAllImages() {
170170
171171
doneItems.forEach((_, i) => {
172172
const index = imageItems.value.indexOf(doneItems[i])
173-
setTimeout(() => downloadImage(index), i * 100)
173+
setTimeout(downloadImage, i * 100, index)
174174
})
175175
}
176176

apps/stage-tamagotchi/src/main/windows/widgets/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export function setupWidgetsWindowManager(params: {
195195
const record: WidgetRecord = { ...snapshot }
196196

197197
if (snapshot.ttlMs > 0) {
198-
record.timer = setTimeout(() => removeWidgetInternal(snapshot.id), snapshot.ttlMs)
198+
record.timer = setTimeout(removeWidgetInternal, snapshot.ttlMs, snapshot.id)
199199
}
200200

201201
widgetRecords.set(snapshot.id, record)

apps/stage-tamagotchi/src/renderer/pages/widgets.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function applySnapshot(snapshot: WidgetSnapshot) {
6565
}
6666
6767
if (snapshot.ttlMs && snapshot.ttlMs > 0) {
68-
ttlTimer = setTimeout(() => requestRemoval(snapshot.id), snapshot.ttlMs)
68+
ttlTimer = setTimeout(requestRemoval, snapshot.ttlMs, snapshot.id)
6969
}
7070
}
7171

apps/stage-tamagotchi/src/renderer/widgets/map/components/Map.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const routePoints = computed(() => {
7474
return [resolvedOrigin.value, resolvedDestination.value]
7575
7676
const first = points[0]
77-
const last = points[points.length - 1]
77+
const last = points.at(-1)
7878
if (first.x !== resolvedOrigin.value.x || first.y !== resolvedOrigin.value.y)
7979
points.unshift(resolvedOrigin.value)
8080
if (last.x !== resolvedDestination.value.x || last.y !== resolvedDestination.value.y)

apps/stage-web/src/components/DataGui/DualEndRange.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const sortedValues = computed(() => {
7373
7474
const sliderStyle = computed(() => {
7575
const sliderOffset = valueToPercent(sortedValues.value[0], props.min, props.max)
76-
const sliderLeap = valueToPercent(sortedValues.value[sortedValues.value.length - 1], props.min, props.max) - sliderOffset
76+
const sliderLeap = valueToPercent(sortedValues.value.at(-1), props.min, props.max) - sliderOffset
7777
return {
7878
left: `${sliderOffset}%`,
7979
width: `${sliderLeap}%`,

apps/stage-web/src/pages/devtools/background-removal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function downloadAllImages() {
170170
171171
doneItems.forEach((_, i) => {
172172
const index = imageItems.value.indexOf(doneItems[i])
173-
setTimeout(() => downloadImage(index), i * 100)
173+
setTimeout(downloadImage, i * 100, index)
174174
})
175175
}
176176

apps/stage-web/src/stores/devtools-lag.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function calcStats(values: number[]) {
4949
const sorted = [...values].sort((a, b) => a - b)
5050
const idx = Math.max(0, Math.floor(0.95 * (sorted.length - 1)))
5151
const p95 = sorted[idx]
52-
const latest = values[values.length - 1]
52+
const latest = values.at(-1)
5353

5454
return { avg, p95, latest }
5555
}
@@ -134,7 +134,7 @@ export const useDevtoolsLagStore = defineStore('devtoolsLag', () => {
134134
recordingStartedAt.value = performance.now()
135135
resetRecordingSamples()
136136

137-
recordingTimeout = setTimeout(() => stopRecording(), 60000)
137+
recordingTimeout = setTimeout(stopRecording, 60000)
138138
}
139139

140140
function stopRecording(): RecordingSnapshot | undefined {

docs/.vitepress/composables/outline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export function useActiveAnchor(
192192

193193
// page bottom - highlight last link
194194
if (isBottom) {
195-
activateLink(headers[headers.length - 1]!.link)
195+
activateLink(headers.at(-1)!.link)
196196
return
197197
}
198198

docs/.vitepress/composables/sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export function hasActiveLink(
288288
}
289289

290290
function addBase(items: SidebarItem[], _base?: string): SidebarItem[] {
291-
return [...items].map((_item) => {
291+
return Array.from(items, (_item) => {
292292
const item = { ..._item }
293293
const base = item.base || _base
294294
if (base && item.link)

0 commit comments

Comments
 (0)