style: braces always, concat over interpolation

This commit is contained in:
smartass
2026-06-11 23:18:26 +05:00
parent 87b3f118ed
commit d339e5674a
5 changed files with 52 additions and 15 deletions
+13
View File
@@ -9,6 +9,19 @@ Applies to every change in this repo, by any agent or human.
- Single quotes where possible
- Functions as `const fn = () => {}` where possible
- No trailing commas before a closing `}`, `]`, `)` (`trailingCommas: none`)
- Always use braces for `if`/`else`/loop bodies — never single-line bodies like
`if (x) return y`. Write:
```ts
if (typeof value === 'bigint') {
return value.toString()
}
```
(Biome `useBlockStatements` enforces this)
- No template-literal interpolation for building strings: use concatenation —
`'[' + engine + '] ' + message`, NOT `` `[${engine}] ${message}` ``.
Plain multi-line template literals WITHOUT `${}` (e.g. SQL text blocks) are fine.
- Biome enforces all of the above — run `npm run lint:fix` before every commit
- Line width 100