Skip to content

Commit

Permalink
chore: enable no-constant-condition rule
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed Jun 13, 2024
1 parent 6d72eb1 commit 8ce5b91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default defineConfig([
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'no-constant-condition': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
},
Expand Down
4 changes: 2 additions & 2 deletions test/atomic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('coverage test for Atomics optimization', async () => {
v = Atomics.load(i32array, 0)
if (popcount8(v) >= 2) break
Atomics.wait(i32array, 0, v)
} while (true)
} while (true) // eslint-disable-line no-constant-condition -- intentional

// The check above could also be !== 2 but it's hard to get things right
// sometimes and this gives us a nice assertion. Basically, at this point
Expand All @@ -42,7 +42,7 @@ test('coverage test for Atomics optimization', async () => {
v = Atomics.load(i32array, 0)
if (popcount8(v) >= 2) break
Atomics.wait(i32array, 0, v)
} while (true)
} while (true) // eslint-disable-line no-constant-condition -- intentional

// At this point, the first two tasks are definitely finished and have
// definitely posted results back to the main thread, and the main thread
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/notify-then-sleep-or.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export default function ({ i32array, index }) {
const v = Atomics.load(i32array, 0)
if (!(v & (1 << index))) break
Atomics.wait(i32array, 0, v)
} while (true)
} while (true) // eslint-disable-line no-constant-condition -- intentional
}

0 comments on commit 8ce5b91

Please sign in to comment.