Skip to content

Commit 5320fe3

Browse files
myieyeclaude
andcommitted
Fix func-style lint warning in formatRelativeDate test
Convert the cfg helper from an arrow expression to a function declaration to match the project's ESLint config. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4dca64e commit 5320fe3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

frontend/viewer/src/lib/components/ui/format/format-relative-date.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import {describe, expect, it} from 'vitest';
22
import {formatRelativeDate} from './format-relative-date-fn.svelte';
33

4-
const cfg = (now: Date, smallestUnit: 'milliseconds' | 'seconds' | 'minutes' | 'hours' = 'seconds') => ({
5-
defaultValue: 'NEVER',
6-
now,
7-
smallestUnit,
8-
});
4+
function cfg(now: Date, smallestUnit: 'milliseconds' | 'seconds' | 'minutes' | 'hours' = 'seconds') {
5+
return {defaultValue: 'NEVER', now, smallestUnit};
6+
}
97

108
describe('formatRelativeDate', () => {
119
it('returns defaultValue for nullish input', () => {

0 commit comments

Comments
 (0)