1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-09-11 23:09:22 +02:00

chore: clean up

This commit is contained in:
2025-08-31 19:35:14 +02:00
parent b16699f5aa
commit 64a5ca73ad
40 changed files with 2679 additions and 3040 deletions

View File

@@ -5,7 +5,6 @@ import { LOCALE_DEFAULT, TIMEZONE } from "@repo/utils/constants"
import type { Preview } from "@storybook/nextjs"
import { NextIntlClientProvider } from "next-intl"
import { ThemeProvider as NextThemeProvider } from "next-themes"
import React from "react"
const preview: Preview = {
initialGlobals: {
@@ -14,6 +13,9 @@ const preview: Preview = {
},
},
parameters: {
a11y: {
test: "error",
},
docs: {
codePanel: true,
},

View File

@@ -1,35 +0,0 @@
import type { TestRunnerConfig } from "@storybook/test-runner"
import { getStoryContext } from "@storybook/test-runner"
import { checkA11y, configureAxe, injectAxe } from "axe-playwright"
/*
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api
*/
const config: TestRunnerConfig = {
async preVisit(page) {
await injectAxe(page)
},
async postVisit(page, context) {
const storyContext = await getStoryContext(page, context)
const isA11yDisabled = storyContext.parameters?.a11y?.disable as boolean
if (isA11yDisabled) {
return
}
await configureAxe(page, {
rules: storyContext.parameters?.a11y?.config?.rules,
})
await checkA11y(page, "#storybook-root", {
verbose: false,
detailedReport: true,
detailedReportOptions: {
html: true,
},
})
},
}
export default config

View File

@@ -38,7 +38,6 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"axe-playwright": "catalog:",
"chromatic": "catalog:",
"eslint": "catalog:",
"start-server-and-test": "catalog:",