chore: update biome to 2.4.14 & apply lint fixes
This commit is contained in:
parent
0e26241e4a
commit
f08a99ccb1
17 changed files with 491 additions and 461 deletions
19
biome.json
19
biome.json
|
|
@ -1,16 +1,21 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
|
||||||
"organizeImports": {
|
"files": {
|
||||||
|
"includes": ["**", "!dist", "!node_modules", "!.temp"]
|
||||||
|
},
|
||||||
|
"assist": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"ignore": ["dist", "node_modules", ".temp"]
|
"actions": {
|
||||||
|
"source": {
|
||||||
|
"organizeImports": "on"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"enabled": true,
|
"enabled": true
|
||||||
"ignore": ["dist", "node_modules", ".temp"]
|
|
||||||
},
|
},
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"ignore": ["dist", "node_modules", ".temp"],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"recommended": true,
|
"recommended": true,
|
||||||
"style": {
|
"style": {
|
||||||
|
|
@ -23,7 +28,7 @@
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"include": ["test"],
|
"includes": ["test/**"],
|
||||||
"linter": {
|
"linter": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"a11y": {
|
"a11y": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
import { stylesheet } from "typestyle";
|
import { stylesheet } from "typestyle";
|
||||||
import { type Component, createElement } from "websnacks";
|
import {
|
||||||
|
type Component,
|
||||||
|
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
|
||||||
|
createElement,
|
||||||
|
} from "websnacks";
|
||||||
|
|
||||||
const styles = stylesheet({
|
const styles = stylesheet({
|
||||||
header: {
|
header: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import { normalize } from "csstips";
|
import { normalize } from "csstips";
|
||||||
import { stylesheet } from "typestyle";
|
import { stylesheet } from "typestyle";
|
||||||
import { type Component, createElement } from "websnacks";
|
import {
|
||||||
|
type Component,
|
||||||
|
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
|
||||||
|
createElement,
|
||||||
|
} from "websnacks";
|
||||||
|
|
||||||
import { stylesheetPath } from "../config";
|
import { stylesheetPath } from "../config";
|
||||||
import { Header } from "./header";
|
import { Header } from "./header";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
import { stylesheet } from "typestyle";
|
import { stylesheet } from "typestyle";
|
||||||
import { type Component, createElement } from "websnacks";
|
import {
|
||||||
|
type Component,
|
||||||
|
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
|
||||||
|
createElement,
|
||||||
|
} from "websnacks";
|
||||||
|
|
||||||
const styles = stylesheet({
|
const styles = stylesheet({
|
||||||
navbar: {
|
navbar: {
|
||||||
|
|
|
||||||
2
examples/personal-site/package-lock.json
generated
2
examples/personal-site/package-lock.json
generated
|
|
@ -20,7 +20,7 @@
|
||||||
"websnacks": "bin/websnacks.js"
|
"websnacks": "bin/websnacks.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.8.3",
|
"@biomejs/biome": "2.4.14",
|
||||||
"@types/node": "~18",
|
"@types/node": "~18",
|
||||||
"@types/ws": "^7.4.0",
|
"@types/ws": "^7.4.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
import { type Component, createElement } from "websnacks";
|
import {
|
||||||
|
type Component,
|
||||||
|
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
|
||||||
|
createElement,
|
||||||
|
} from "websnacks";
|
||||||
|
|
||||||
import { Layout } from "../components/layout";
|
import { Layout } from "../components/layout";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
import { stylesheet } from "typestyle";
|
import { stylesheet } from "typestyle";
|
||||||
import { type Component, createElement } from "websnacks";
|
import {
|
||||||
|
type Component,
|
||||||
|
// biome-ignore lint/correctness/noUnusedImports: required to support JSX
|
||||||
|
createElement,
|
||||||
|
} from "websnacks";
|
||||||
|
|
||||||
import { Layout } from "../components/layout";
|
import { Layout } from "../components/layout";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import type { Config } from "websnacks";
|
||||||
|
|
||||||
import { stylesheetPath } from "./config";
|
import { stylesheetPath } from "./config";
|
||||||
|
|
||||||
const config: Config = {
|
const _config: Config = {
|
||||||
// Watch additional files and folders for changes when the dev server is
|
// Watch additional files and folders for changes when the dev server is
|
||||||
// running.
|
// running.
|
||||||
watch: ["components/", "config.ts"],
|
watch: ["components/", "config.ts"],
|
||||||
|
|
|
||||||
82
package-lock.json
generated
82
package-lock.json
generated
|
|
@ -12,7 +12,7 @@
|
||||||
"websnacks": "bin/websnacks.js"
|
"websnacks": "bin/websnacks.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.8.3",
|
"@biomejs/biome": "2.4.14",
|
||||||
"@types/node": "~18",
|
"@types/node": "~18",
|
||||||
"@types/ws": "^7.4.0",
|
"@types/ws": "^7.4.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
|
@ -27,11 +27,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/biome": {
|
"node_modules/@biomejs/biome": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.4.14.tgz",
|
||||||
"integrity": "sha512-/uUV3MV+vyAczO+vKrPdOW0Iaet7UnJMU4bNMinggGJTAnBPjCoLEYcyYtYHNnUNYlv4xZMH6hVIQCAozq8d5w==",
|
"integrity": "sha512-TmAvxOEgrpLypzVGJ8FulIZnlyA9TxrO1hyqYrCz9r+bwma9xXxuLA5IuYnj55XQneFx460KjRbx6SWGLkg3bQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"license": "MIT OR Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"biome": "bin/biome"
|
"biome": "bin/biome"
|
||||||
},
|
},
|
||||||
|
|
@ -43,24 +43,25 @@
|
||||||
"url": "https://opencollective.com/biome"
|
"url": "https://opencollective.com/biome"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@biomejs/cli-darwin-arm64": "1.8.3",
|
"@biomejs/cli-darwin-arm64": "2.4.14",
|
||||||
"@biomejs/cli-darwin-x64": "1.8.3",
|
"@biomejs/cli-darwin-x64": "2.4.14",
|
||||||
"@biomejs/cli-linux-arm64": "1.8.3",
|
"@biomejs/cli-linux-arm64": "2.4.14",
|
||||||
"@biomejs/cli-linux-arm64-musl": "1.8.3",
|
"@biomejs/cli-linux-arm64-musl": "2.4.14",
|
||||||
"@biomejs/cli-linux-x64": "1.8.3",
|
"@biomejs/cli-linux-x64": "2.4.14",
|
||||||
"@biomejs/cli-linux-x64-musl": "1.8.3",
|
"@biomejs/cli-linux-x64-musl": "2.4.14",
|
||||||
"@biomejs/cli-win32-arm64": "1.8.3",
|
"@biomejs/cli-win32-arm64": "2.4.14",
|
||||||
"@biomejs/cli-win32-x64": "1.8.3"
|
"@biomejs/cli-win32-x64": "2.4.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.14.tgz",
|
||||||
"integrity": "sha512-9DYOjclFpKrH/m1Oz75SSExR8VKvNSSsLnVIqdnKexj6NwmiMlKk94Wa1kZEdv6MCOHGHgyyoV57Cw8WzL5n3A==",
|
"integrity": "sha512-XvgoE9XOawUOQPdmvs4J7wPhi/DLwSCGks3AlPJDmh34O0awRTqCED1HRcRDdpf1Zrp4us4MGOOdIxNpbqNF5Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
|
|
@ -70,13 +71,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-darwin-x64": {
|
"node_modules/@biomejs/cli-darwin-x64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.14.tgz",
|
||||||
"integrity": "sha512-UeW44L/AtbmOF7KXLCoM+9PSgPo0IDcyEUfIoOXYeANaNXXf9mLUwV1GeF2OWjyic5zj6CnAJ9uzk2LT3v/wAw==",
|
"integrity": "sha512-jE7hKBCFhOx3uUh+ZkWBfOHxAcILPfhFplNkuID/eZeSTLHzfZzoZxW8fbqY9xXRnPi7jGNAf1iPVR+0yWsM/Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
|
|
@ -86,13 +88,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64": {
|
"node_modules/@biomejs/cli-linux-arm64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.14.tgz",
|
||||||
"integrity": "sha512-fed2ji8s+I/m8upWpTJGanqiJ0rnlHOK3DdxsyVLZQ8ClY6qLuPc9uehCREBifRJLl/iJyQpHIRufLDeotsPtw==",
|
"integrity": "sha512-2TELhZnW5RSLL063l9rc5xLpA0ZIw0Ccwy/0q384rvNAgFw3yI76bd59547yxowdQr5MNPET/xDLrLuvgSeeWQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
|
|
@ -102,13 +105,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.14.tgz",
|
||||||
"integrity": "sha512-9yjUfOFN7wrYsXt/T/gEWfvVxKlnh3yBpnScw98IF+oOeCYb5/b/+K7YNqKROV2i1DlMjg9g/EcN9wvj+NkMuQ==",
|
"integrity": "sha512-/z+6gqAqqUQTHazwStxSXKHg9b8UvqBmDFRp+c4wYbq2KXhELQDon9EoC9RpmQ8JWkqQx/lIUy/cs+MhzDZp6A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
|
|
@ -118,13 +122,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64": {
|
"node_modules/@biomejs/cli-linux-x64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.14.tgz",
|
||||||
"integrity": "sha512-I8G2QmuE1teISyT8ie1HXsjFRz9L1m5n83U1O6m30Kw+kPMPSKjag6QGUn+sXT8V+XWIZxFFBoTDEDZW2KPDDw==",
|
"integrity": "sha512-zHrlQZDBDUz4OLAraYpWKcnLS6HOewBFWYOzY91d1ZjdqZwibOyb6BEu6WuWLugyo0P3riCmsbV9UqV1cSXwQg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
|
|
@ -134,13 +139,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-linux-x64-musl": {
|
"node_modules/@biomejs/cli-linux-x64-musl": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.14.tgz",
|
||||||
"integrity": "sha512-UHrGJX7PrKMKzPGoEsooKC9jXJMa28TUSMjcIlbDnIO4EAavCoVmNQaIuUSH0Ls2mpGMwUIf+aZJv657zfWWjA==",
|
"integrity": "sha512-R6BWgJdQOwW9ulJatuTVrQkjnODjqHZkKNOqb1sz++3Noe5LYd0i3PchnOBUCYAPHoPWHhjJqbdZlHEu0hpjdA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
|
|
@ -150,13 +156,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-arm64": {
|
"node_modules/@biomejs/cli-win32-arm64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.14.tgz",
|
||||||
"integrity": "sha512-J+Hu9WvrBevfy06eU1Na0lpc7uR9tibm9maHynLIoAjLZpQU3IW+OKHUtyL8p6/3pT2Ju5t5emReeIS2SAxhkQ==",
|
"integrity": "sha512-M3EH5hqOI/F/FUA2u4xcLoUgmxd218mvuj/6JL7Hv2toQvr2/AdOvKSpGkoRuWFCtQPVa+ZqkEV3Q5xBA9+XSA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
|
|
@ -166,13 +173,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/cli-win32-x64": {
|
"node_modules/@biomejs/cli-win32-x64": {
|
||||||
"version": "1.8.3",
|
"version": "2.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.14.tgz",
|
||||||
"integrity": "sha512-/PJ59vA1pnQeKahemaQf4Nyj7IKUvGQSc3Ze1uIGi+Wvr1xF7rGobSrAAG01T/gUDG21vkDsZYM03NAmPiVkqg==",
|
"integrity": "sha512-WL0EG5qE+EAKomGXbf2g6VnSKJhTL3tXC0QRzWRwA5VpjxNYa6H4P7ZWfymbGE4IhZZQi1KXQ2R0YjwInmz2fA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT OR Apache-2.0",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
"test:e2e": "cd test && ts-node --script-mode ./run-e2e.ts"
|
"test:e2e": "cd test && ts-node --script-mode ./run-e2e.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.8.3",
|
"@biomejs/biome": "2.4.14",
|
||||||
"@types/node": "~18",
|
"@types/node": "~18",
|
||||||
"@types/ws": "^7.4.0",
|
"@types/ws": "^7.4.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ const copyStaticAssets = async ({
|
||||||
}: ConfigPaths): Promise<void> => {
|
}: ConfigPaths): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await fs.access(staticAssetsDir);
|
await fs.access(staticAssetsDir);
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
// Static assets folder doesn't exist, so no-op.
|
// Static assets folder doesn't exist, so no-op.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { promises as fs, existsSync, watch } from "node:fs";
|
import { existsSync, promises as fs, watch } from "node:fs";
|
||||||
import * as http from "node:http";
|
import * as http from "node:http";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
|
||||||
|
|
@ -152,7 +152,7 @@ const startHttpServer = async (publicDir: string): Promise<http.Server> => {
|
||||||
let contents: Buffer | string;
|
let contents: Buffer | string;
|
||||||
try {
|
try {
|
||||||
contents = await fs.readFile(path.join(publicDir, reqPath));
|
contents = await fs.readFile(path.join(publicDir, reqPath));
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
console.error(`unable to load file ${reqPath}`);
|
console.error(`unable to load file ${reqPath}`);
|
||||||
res.writeHead(404);
|
res.writeHead(404);
|
||||||
res.end();
|
res.end();
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ export const loadConfig = async (rootDir: string): Promise<Config> => {
|
||||||
decacheModule(configPath);
|
decacheModule(configPath);
|
||||||
// TODO: validate user config.
|
// TODO: validate user config.
|
||||||
userConfig = await import(configPath);
|
userConfig = await import(configPath);
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
// Use default config;
|
// Use default config;
|
||||||
}
|
}
|
||||||
const outDir = path.join(rootDir, "public");
|
const outDir = path.join(rootDir, "public");
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { HTMLElement, Component, Fragment } from "./component";
|
export { Component, Fragment, HTMLElement } from "./component";
|
||||||
export { UserConfig as Config, defineConfig } from "./config";
|
export { defineConfig, UserConfig as Config } from "./config";
|
||||||
export { createElement } from "./create-element";
|
export { createElement } from "./create-element";
|
||||||
export * from "./jsx";
|
export * from "./jsx";
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import { promises as fs } from "node:fs";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
WEBSNACKS_BIN_PATH,
|
|
||||||
WEBSNACKS_REPO_ROOT,
|
|
||||||
npmCmd,
|
npmCmd,
|
||||||
runCommand,
|
runCommand,
|
||||||
|
WEBSNACKS_BIN_PATH,
|
||||||
|
WEBSNACKS_REPO_ROOT,
|
||||||
withTempDir,
|
withTempDir,
|
||||||
} from "../helpers/e2e";
|
} from "../helpers/e2e";
|
||||||
import { testSuite } from "../lib";
|
import { testSuite } from "../lib";
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import { promises as fs } from "node:fs";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
WEBSNACKS_BIN_PATH,
|
|
||||||
WEBSNACKS_REPO_ROOT,
|
|
||||||
npmCmd,
|
npmCmd,
|
||||||
runCommand,
|
runCommand,
|
||||||
|
WEBSNACKS_BIN_PATH,
|
||||||
|
WEBSNACKS_REPO_ROOT,
|
||||||
wait,
|
wait,
|
||||||
withTempDir,
|
withTempDir,
|
||||||
} from "../helpers/e2e";
|
} from "../helpers/e2e";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { type Component, Fragment, createElement } from "../../dist";
|
import { type Component, createElement, Fragment } from "../../dist";
|
||||||
import { renderPage } from "../../dist/render";
|
import { renderPage } from "../../dist/render";
|
||||||
import { testSuite } from "../lib";
|
import { testSuite } from "../lib";
|
||||||
|
|
||||||
|
|
@ -118,7 +118,6 @@ testSuite("renderPage", ({ test, expect }) => {
|
||||||
const html = renderPage(
|
const html = renderPage(
|
||||||
<html>
|
<html>
|
||||||
<div
|
<div
|
||||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: explicit test
|
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: "<div>red alert!</div>",
|
__html: "<div>red alert!</div>",
|
||||||
}}
|
}}
|
||||||
|
|
@ -135,8 +134,6 @@ testSuite("renderPage", ({ test, expect }) => {
|
||||||
renderPage(
|
renderPage(
|
||||||
<html>
|
<html>
|
||||||
<div
|
<div
|
||||||
// biome-ignore lint/security/noDangerouslySetInnerHtml: explicit test
|
|
||||||
// biome-ignore lint/security/noDangerouslySetInnerHtmlWithChildren: explicit test
|
|
||||||
dangerouslySetInnerHTML={{
|
dangerouslySetInnerHTML={{
|
||||||
__html: "<div>set phasers to kill</div>",
|
__html: "<div>set phasers to kill</div>",
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue