style: apply the biome 2.6 lint and format fixes

Biome 2.6 adds the useMathMinMax and useDomNodeTextContent rules and
starts formatting Markdown.

- Use Math.max and Math.min for the clamping ternaries
- Align the README tables
This commit is contained in:
2026-11-04 13:52:29 +09:00
parent b0797e859d
commit 9ea0cbac45
3 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -44,14 +44,14 @@ it in directly. It is generated content and is not tracked in git.
## Scripts
| Command | Description |
| --- | --- |
| `npm run dev` | Start the dev server on http://localhost:5173 |
| `npm run build` | Type-check and build into `dist/` |
| `npm run preview` | Serve the production build on http://localhost:4173 |
| `npm run lint` | Lint with [Biome](https://biomejs.dev/) |
| `npm run format` | Format with Biome |
| `npm run check` | Lint, format and organize imports, applying the safe fixes |
| Command | Description |
| ----------------- | ---------------------------------------------------------- |
| `npm run dev` | Start the dev server on http://localhost:5173 |
| `npm run build` | Type-check and build into `dist/` |
| `npm run preview` | Serve the production build on http://localhost:4173 |
| `npm run lint` | Lint with [Biome](https://biomejs.dev/) |
| `npm run format` | Format with Biome |
| `npm run check` | Lint, format and organize imports, applying the safe fixes |
`@types/node` is pinned to the major that matches the Node runtime in use (24);
`.ncurc.js` keeps `npm-check-updates` from bumping it past that.
+1 -1
View File
@@ -47,7 +47,7 @@ const Preview = (props: Props) => {
</div>
<Lightbox
open={imageIndex >= 0}
index={imageIndex < 0 ? 0 : imageIndex}
index={Math.max(imageIndex, 0)}
close={() => setImageIndex(-1)}
slides={slides}
/>
+2 -2
View File
@@ -177,8 +177,8 @@ const DatabaseListItem = (props: Props) => {
</Link>
);
};
let startPage = condition.page - 4 > 1 ? condition.page - 4 : 1;
const endPage = startPage + 9 > maxPage ? maxPage : startPage + 9;
let startPage = Math.max(condition.page - 4, 1);
const endPage = Math.min(startPage + 9, maxPage);
if (endPage - startPage < 9) {
startPage = endPage - 9 > 0 ? endPage - 9 : 1;
}