Skip to content

Commit 1d86de2

Browse files
Stricten type check
1 parent 78d216d commit 1d86de2

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

astro.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import sitemap from '@astrojs/sitemap'
44
import tailwindcss from '@tailwindcss/vite'
55
import { defineConfig } from 'astro/config'
66

7-
const parsePublishTime: RemarkPlugin = () => (tree, file) => {
7+
const parsePublishTime: RemarkPlugin = () => (_tree, file) => {
88
const maybeDateString = /\d+-\d+-\d+/.exec(file.path)
99
let authorOffsetDate = null
1010
if (maybeDateString) {

lostpixel.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function pagePaths(): string[] {
3333
)
3434
const urlsRe = new RegExp(`${siteUrl}(/[^<]*)`, 'g')
3535
return Array.from(sitemapXml.matchAll(urlsRe)).map(([, url]) =>
36-
url.replaceAll('&amp;', '&'),
36+
// biome-ignore lint/style/noNonNullAssertion: guaranteed group at this point
37+
url!.replaceAll('&amp;', '&'),
3738
)
3839
}
3940

src/scripts/oklch2rgb.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ import * as culori from 'culori'
1616
function oklch2rgb(oklchString: string): string {
1717
// biome-ignore lint/style/noNonNullAssertion: guaranteed to match when called in require.main
1818
const [, valuesString] = oklchString.match(/oklch\((.*?)\)/)!
19-
const values = valuesString.split('/').map((v) => Number.parseFloat(v))
19+
// biome-ignore lint/style/noNonNullAssertion: guaranteed group at this point
20+
const values = valuesString!.split('/').map((v) => Number.parseFloat(v))
2021

2122
const [l, c, h, alpha] = values
2223

2324
const parsed = culori.oklch({
2425
mode: 'oklch',
25-
l: l,
26+
l: l || 0,
2627
c: c || 0,
2728
h: h || 0,
2829
alpha: alpha !== undefined ? alpha : 1,

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"strictNullChecks": true
55
},
66
"exclude": ["dist"],
7-
"extends": "astro/tsconfigs/strict",
7+
"extends": "astro/tsconfigs/strictest",
88
"include": [".astro/types.d.ts", "**/*"]
99
}

0 commit comments

Comments
 (0)