Skip to content

Commit 1dac550

Browse files
committed
fix(lint): add ESLint overrides for test files
- Disable no-import-assign for test files (needed for immutability tests) - Disable no-await-in-loop for test files (tests often need this pattern) - Auto-fix curly brace and destructure key sorting issues All lint checks now pass in both Biome and ESLint.
1 parent 19eb2e3 commit 1dac550

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.config/eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ export default [
353353
'line-comment-position': 'off',
354354
'unicorn/consistent-function-scoping': 'off',
355355
'no-undef': 'off', // TypeScript handles this
356+
'no-import-assign': 'off', // Tests intentionally reassign imports to test immutability
357+
'no-await-in-loop': 'off', // Tests often need to await in loops
356358
},
357359
},
358360
{

test/maintained-node-versions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('maintained-node-versions', () => {
7575
.map(v => v.split('.').map(Number))
7676
.sort((a, b) => {
7777
for (let i = 0; i < 3; i++) {
78-
if (a[i] !== b[i]) return a[i] - b[i]
78+
if (a[i] !== b[i]) {return a[i] - b[i]}
7979
}
8080
return 0
8181
})

test/performance.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('performance', () => {
6969

7070
describe('measure', () => {
7171
it('should measure async function duration', async () => {
72-
const { result, duration } = await measure('async-op', async () => {
72+
const { duration, result } = await measure('async-op', async () => {
7373
await new Promise(resolve => setTimeout(resolve, 50))
7474
return 'test-result'
7575
})
@@ -98,7 +98,7 @@ describe('performance', () => {
9898

9999
describe('measureSync', () => {
100100
it('should measure sync function duration', () => {
101-
const { result, duration } = measureSync('sync-op', () => {
101+
const { duration, result } = measureSync('sync-op', () => {
102102
// Simulate some work
103103
let sum = 0
104104
for (let i = 0; i < 1000; i++) {

0 commit comments

Comments
 (0)