feat: update biome configuration and plugins; remove deprecated missing.grit

This commit is contained in:
Marco Pedone 2026-02-17 12:36:37 +01:00
parent 7643e5a430
commit a18274bded
7 changed files with 61 additions and 69 deletions

View file

@ -1,5 +1,5 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", "$schema": "https://biomejs.dev/schemas/2.4.2/schema.json",
"assist": { "assist": {
"actions": { "actions": {
"source": { "source": {
@ -123,7 +123,8 @@
} }
}, },
"plugins": [ "plugins": [
"biome_plugins/missing.grit", "biome_plugins/missing_select.grit",
"biome_plugins/missing_where.grit",
"biome_plugins/null.grit" "biome_plugins/null.grit"
], ],
"vcs": { "vcs": {
@ -132,4 +133,4 @@
"root": "../../", "root": "../../",
"useIgnoreFile": false "useIgnoreFile": false
} }
} }

View file

@ -1,25 +0,0 @@
language js
`$fn($_)` where {
if ($fn <: contains `selectFrom`) {
or {
$fn <: contains `execute`,
$fn <: contains `executeTakeFirst`,
$fn <: contains `executeTakeFirstOrThrow`
},
! $fn <: contains `select`,
! $fn <: contains `selectAll`,
register_diagnostic(span=$fn, message="select statement must contain select() or selectAll()", severity="error")
} else if (or {
$fn <: contains `updateTable`,
$fn <: contains `deleteFrom`
}) {
or {
$fn <: contains `execute`,
$fn <: contains `executeTakeFirst`,
$fn <: contains `executeTakeFirstOrThrow`
},
! $fn <: contains `where`,
register_diagnostic(span=$fn, message="update or delete statements must contain where()", severity="error")
}
}

View file

@ -0,0 +1,9 @@
language js(typescript)
`$chain.$exec()` where {
$exec <: or { `execute`, `executeTakeFirst`, `executeTakeFirstOrThrow` },
$chain <: contains `selectFrom`,
! $chain <: contains `select`,
! $chain <: contains `selectAll`,
register_diagnostic(span=$chain, message="select statement must contain select() or selectAll()", severity="error")
}

View file

@ -0,0 +1,8 @@
language js(typescript)
`$chain.$exec()` where {
$exec <: or { `execute`, `executeTakeFirst`, `executeTakeFirstOrThrow` },
or { $chain <: contains `updateTable`, $chain <: contains `deleteFrom` },
! $chain <: contains `where`,
register_diagnostic(span=$chain, message="update or delete statements must contain where()", severity="error")
}

View file

@ -1,7 +1,6 @@
language js language js(typescript)
`$fn($a)` where { `$chain.where($a)` where {
$fn <: contains `where`,
or { or {
$a <: contains `'='`, $a <: contains `'='`,
$a <: contains `'=='`, $a <: contains `'=='`,

View file

@ -97,7 +97,7 @@
"zod": "^4.1.12" "zod": "^4.1.12"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^2.3.1", "@biomejs/biome": "^2.4.2",
"@hookform/devtools": "^4.4.0", "@hookform/devtools": "^4.4.0",
"@react-email/preview-server": "^5.2.5", "@react-email/preview-server": "^5.2.5",
"@total-typescript/ts-reset": "^0.6.1", "@total-typescript/ts-reset": "^0.6.1",
@ -1016,9 +1016,9 @@
} }
}, },
"node_modules/@biomejs/biome": { "node_modules/@biomejs/biome": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.2.tgz",
"integrity": "sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ==", "integrity": "sha512-vVE/FqLxNLbvYnFDYg3Xfrh1UdFhmPT5i+yPT9GE2nTUgI4rkqo5krw5wK19YHBd7aE7J6r91RRmb8RWwkjy6w==",
"dev": true, "dev": true,
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"bin": { "bin": {
@ -1032,20 +1032,20 @@
"url": "https://opencollective.com/biome" "url": "https://opencollective.com/biome"
}, },
"optionalDependencies": { "optionalDependencies": {
"@biomejs/cli-darwin-arm64": "2.3.11", "@biomejs/cli-darwin-arm64": "2.4.2",
"@biomejs/cli-darwin-x64": "2.3.11", "@biomejs/cli-darwin-x64": "2.4.2",
"@biomejs/cli-linux-arm64": "2.3.11", "@biomejs/cli-linux-arm64": "2.4.2",
"@biomejs/cli-linux-arm64-musl": "2.3.11", "@biomejs/cli-linux-arm64-musl": "2.4.2",
"@biomejs/cli-linux-x64": "2.3.11", "@biomejs/cli-linux-x64": "2.4.2",
"@biomejs/cli-linux-x64-musl": "2.3.11", "@biomejs/cli-linux-x64-musl": "2.4.2",
"@biomejs/cli-win32-arm64": "2.3.11", "@biomejs/cli-win32-arm64": "2.4.2",
"@biomejs/cli-win32-x64": "2.3.11" "@biomejs/cli-win32-x64": "2.4.2"
} }
}, },
"node_modules/@biomejs/cli-darwin-arm64": { "node_modules/@biomejs/cli-darwin-arm64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.2.tgz",
"integrity": "sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA==", "integrity": "sha512-3pEcKCP/1POKyaZZhXcxFl3+d9njmeAihZ17k8lL/1vk+6e0Cbf0yPzKItFiT+5Yh6TQA4uKvnlqe0oVZwRxCA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1060,9 +1060,9 @@
} }
}, },
"node_modules/@biomejs/cli-darwin-x64": { "node_modules/@biomejs/cli-darwin-x64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.2.tgz",
"integrity": "sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg==", "integrity": "sha512-P7hK1jLVny+0R9UwyGcECxO6sjETxfPyBm/1dmFjnDOHgdDPjPqozByunrwh4xPKld8sxOr5eAsSqal5uKgeBg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1077,9 +1077,9 @@
} }
}, },
"node_modules/@biomejs/cli-linux-arm64": { "node_modules/@biomejs/cli-linux-arm64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.2.tgz",
"integrity": "sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g==", "integrity": "sha512-DI3Mi7GT2zYNgUTDEbSjl3e1KhoP76OjQdm8JpvZYZWtVDRyLd3w8llSr2TWk1z+U3P44kUBWY3X7H9MD1/DGQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1094,9 +1094,9 @@
} }
}, },
"node_modules/@biomejs/cli-linux-arm64-musl": { "node_modules/@biomejs/cli-linux-arm64-musl": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.2.tgz",
"integrity": "sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg==", "integrity": "sha512-/x04YK9+7erw6tYEcJv9WXoBHcULI/wMOvNdAyE9S3JStZZ9yJyV67sWAI+90UHuDo/BDhq0d96LDqGlSVv7WA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1111,9 +1111,9 @@
} }
}, },
"node_modules/@biomejs/cli-linux-x64": { "node_modules/@biomejs/cli-linux-x64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.2.tgz",
"integrity": "sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg==", "integrity": "sha512-GK2ErnrKpWFigYP68cXiCHK4RTL4IUWhK92AFS3U28X/nuAL5+hTuy6hyobc8JZRSt+upXt1nXChK+tuHHx4mA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1128,9 +1128,9 @@
} }
}, },
"node_modules/@biomejs/cli-linux-x64-musl": { "node_modules/@biomejs/cli-linux-x64-musl": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.2.tgz",
"integrity": "sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw==", "integrity": "sha512-wbBmTkeAoAYbOQ33f6sfKG7pcRSydQiF+dTYOBjJsnXO2mWEOQHllKlC2YVnedqZFERp2WZhFUoO7TNRwnwEHQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -1145,9 +1145,9 @@
} }
}, },
"node_modules/@biomejs/cli-win32-arm64": { "node_modules/@biomejs/cli-win32-arm64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.2.tgz",
"integrity": "sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw==", "integrity": "sha512-k2uqwLYrNNxnaoiW3RJxoMGnbKda8FuCmtYG3cOtVljs3CzWxaTR+AoXwKGHscC9thax9R4kOrtWqWN0+KdPTw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -1162,9 +1162,9 @@
} }
}, },
"node_modules/@biomejs/cli-win32-x64": { "node_modules/@biomejs/cli-win32-x64": {
"version": "2.3.11", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.11.tgz", "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.2.tgz",
"integrity": "sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg==", "integrity": "sha512-9ma7C4g8Sq3cBlRJD2yrsHXB1mnnEBdpy7PhvFrylQWQb4PoyCmPucdX7frvsSBQuFtIiKCrolPl/8tCZrKvgQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],

View file

@ -109,7 +109,7 @@
"zod": "^4.1.12" "zod": "^4.1.12"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^2.3.1", "@biomejs/biome": "^2.4.2",
"@hookform/devtools": "^4.4.0", "@hookform/devtools": "^4.4.0",
"@react-email/preview-server": "^5.2.5", "@react-email/preview-server": "^5.2.5",
"@total-typescript/ts-reset": "^0.6.1", "@total-typescript/ts-reset": "^0.6.1",
@ -133,4 +133,4 @@
"ct3aMetadata": { "ct3aMetadata": {
"initVersion": "7.9.0" "initVersion": "7.9.0"
} }
} }