Skip to content

Commit 7bf8a9d

Browse files
chore(devdeps): update oxlint monorepo (#6252)
* chore(devdeps): update oxlint monorepo * fix: lint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lisa LUPI <llupi@scaleway.com>
1 parent 45210c8 commit 7bf8a9d

File tree

13 files changed

+219
-216
lines changed

13 files changed

+219
-216
lines changed

.oxlintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@
9191
"vitest/prefer-describe-function-title": "warn",
9292
"vitest/prefer-lowercase-title": "error",
9393
"vitest/no-importing-vitest-globals": "off",
94-
"vitest/prefer-import-in-mock": "off"
94+
"vitest/prefer-import-in-mock": "off",
95+
"vitest/prefer-to-be-falsy": "off",
96+
"vitest/prefer-to-be-truthy": "off"
9597
}
9698
},
9799
{

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
"jest-axe": "10.0.0",
101101
"jsdom": "29.0.1",
102102
"lint-staged": "16.4.0",
103-
"oxfmt": "0.41.0",
104-
"oxlint": "1.56.0",
103+
"oxfmt": "0.42.0",
104+
"oxlint": "1.57.0",
105105
"oxlint-tsgolint": "0.17.4",
106106
"postcss": "8.5.8",
107107
"publint": "0.3.18",

packages/form/src/components/ToggleField/__tests__/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('toggleField', () => {
2222
},
2323
})
2424
const element = screen.getByRole<HTMLInputElement>('checkbox')
25-
expect(element.checked).toBeTruthy()
25+
expect(element.checked).toBe(true)
2626
expect(asFragment()).toMatchSnapshot()
2727
})
2828

packages/form/src/validators/__tests__/maxDate.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ const tomorrow = new Date(today.getTime() + 24 * hourInMs)
1111
describe('maxDate validator', () => {
1212
test('should success', () => {
1313
const validator = maxDateValidator(yesterday)
14-
expect(validator(today)).toBeFalsy()
15-
expect(validator(twoHoursLater)).toBeFalsy()
16-
expect(validator(tomorrow)).toBeFalsy()
14+
expect(validator(today)).toBe(false)
15+
expect(validator(twoHoursLater)).toBe(false)
16+
expect(validator(tomorrow)).toBe(false)
1717
})
1818

1919
test('should failed', () => {
2020
const validator = maxDateValidator(tomorrow)
21-
expect(validator(yesterday)).toBeTruthy()
22-
expect(validator(today)).toBeTruthy()
23-
expect(validator(twoHoursLater)).toBeTruthy()
21+
expect(validator(yesterday)).toBe(true)
22+
expect(validator(today)).toBe(true)
23+
expect(validator(twoHoursLater)).toBe(true)
2424
})
2525
})

packages/form/src/validators/__tests__/minDate.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ const tomorrow = new Date(today.getTime() + 24 * hourInMs)
1111
describe('minDate validator', () => {
1212
test('should invalidate the input', () => {
1313
const validator = minDateValidator(tomorrow)
14-
expect(validator(today)).toBeFalsy()
15-
expect(validator(twoHoursLater)).toBeFalsy()
16-
expect(validator(yesterday)).toBeFalsy()
14+
expect(validator(today)).toBe(false)
15+
expect(validator(twoHoursLater)).toBe(false)
16+
expect(validator(yesterday)).toBe(false)
1717
})
1818

1919
test('should validate the input', () => {
2020
const validator = minDateValidator(yesterday)
21-
expect(validator(today)).toBeTruthy()
22-
expect(validator(tomorrow)).toBeTruthy()
23-
expect(validator(twoHoursLater)).toBeTruthy()
21+
expect(validator(today)).toBe(true)
22+
expect(validator(tomorrow)).toBe(true)
23+
expect(validator(twoHoursLater)).toBe(true)
2424
})
2525
})

packages/ui/src/components/Checkbox/__tests__/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ describe('checkbox', () => {
141141
hidden: true,
142142
})
143143
await userEvent.click(input)
144-
expect(input.checked).toBeTruthy()
144+
expect(input.checked).toBe(true)
145145
})
146146
})

packages/ui/src/components/DateInput/__tests__/helper.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ describe('helper functions dateInput', () => {
5050
})
5151

5252
test('isSameMonth should work', () => {
53-
expect(
54-
isSameMonth(new Date('23 Dec 2023'), new Date('22 Dec 2023')),
55-
).toBeTruthy()
56-
expect(
57-
isSameMonth(new Date('23 Dec 2023'), new Date('23 Oct 2023')),
58-
).toBeFalsy()
53+
expect(isSameMonth(new Date('23 Dec 2023'), new Date('22 Dec 2023'))).toBe(
54+
true,
55+
)
56+
expect(isSameMonth(new Date('23 Dec 2023'), new Date('23 Oct 2023'))).toBe(
57+
false,
58+
)
5959
})
6060

6161
test('isSameDay should work', () => {
62-
expect(isSameDay(new Date(), new Date('22 Dec 1999'))).toBeFalsy()
63-
expect(
64-
isSameDay(new Date('23 Dec 2023'), new Date('23 Dec 2023')),
65-
).toBeTruthy()
62+
expect(isSameDay(new Date(), new Date('22 Dec 1999'))).toBe(false)
63+
expect(isSameDay(new Date('23 Dec 2023'), new Date('23 Dec 2023'))).toBe(
64+
true,
65+
)
6666
})
6767

6868
test('formatValue should work with default formatting', () => {

packages/ui/src/components/Modal/components/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export const Dialog = ({
271271
}),
272272
...style,
273273
}}
274-
// oxlint-disable a11y/noNoninteractiveTabindex: to fix
274+
// oxlint-disable-next-line jsx_a11y/no-noninteractive-tabindex
275275
tabIndex={0}
276276
>
277277
{image ? (

packages/ui/src/components/SelectInput/components/SelectBar/SelectBar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ const SelectBar = ({
257257
}}
258258
ref={innerRef}
259259
role="combobox"
260+
// oxlint-disable-next-line jsx_a11y/no-noninteractive-tabindex
260261
tabIndex={0}
261262
>
262263
{shouldDisplayValues ? (

packages/ui/src/components/TimeInput/__tests__/helper.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ import {
1313

1414
describe('helper functions dateInput', () => {
1515
test('isNumber should work', () => {
16-
expect(isNumber('2')).toBeTruthy()
17-
expect(isNumber('a')).toBeFalsy()
16+
expect(isNumber('2')).toBe(true)
17+
expect(isNumber('a')).toBe(false)
1818
})
1919

2020
test('isAOrP should work', () => {
21-
expect(isAOrP('a')).toBeTruthy()
22-
expect(isAOrP('p')).toBeTruthy()
23-
expect(isAOrP('d')).toBeFalsy()
21+
expect(isAOrP('a')).toBe(true)
22+
expect(isAOrP('p')).toBe(true)
23+
expect(isAOrP('d')).toBe(false)
2424
})
2525

2626
test('canConcat should work', () => {
27-
expect(canConcat(3, 'h', 3, 12)).toBeFalsy()
28-
expect(canConcat(1, 'm', 2, 24)).toBeTruthy()
29-
expect(canConcat(1, 'm', 2, 12)).toBeTruthy()
27+
expect(canConcat(3, 'h', 3, 12)).toBe(false)
28+
expect(canConcat(1, 'm', 2, 24)).toBe(true)
29+
expect(canConcat(1, 'm', 2, 12)).toBe(true)
3030
})
3131

3232
test('isCompleteHour should work', () => {
33-
expect(isCompleteHour(24, 2)).toBeFalsy()
34-
expect(isCompleteHour(12, 13)).toBeTruthy()
35-
expect(isCompleteHour(24, 4)).toBeTruthy()
33+
expect(isCompleteHour(24, 2)).toBe(false)
34+
expect(isCompleteHour(12, 13)).toBe(true)
35+
expect(isCompleteHour(24, 4)).toBe(true)
3636
})
3737

3838
test('getLastTypedChar should work', () => {

0 commit comments

Comments
 (0)