Add unicorn lint rules - DOM built-in functions (#628)

- Prefer append(), remove(), replaceAll()
- Wrap nested ternaries in parenthesis
This commit is contained in:
filtered
2025-02-27 20:18:25 +11:00
committed by GitHub
parent 6f51767451
commit 1e8938ceff
11 changed files with 60 additions and 56 deletions

View File

@@ -91,7 +91,7 @@ export type {
} from "./types/serialisation"
export function clamp(v: number, a: number, b: number): number {
return a > v ? a : b < v ? b : v
return a > v ? a : (b < v ? b : v)
}
// Load legacy polyfills