style: braces always, concat over interpolation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user