Skip to content

Commit 9174d0c

Browse files
storybook works with vite + lint
1 parent 132ad43 commit 9174d0c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ui/.storybook/test-runner.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { expect } from "vitest";
21
import { getStoryContext, TestRunnerConfig, waitForPageReady } from '@storybook/test-runner';
32
import { toMatchImageSnapshot } from 'jest-image-snapshot';
43

4+
55
const config: TestRunnerConfig = {
66
setup() {
7+
// @ts-ignore
78
expect.extend({ toMatchImageSnapshot });
89
},
910
async preVisit(page, context) {
@@ -49,6 +50,7 @@ const config: TestRunnerConfig = {
4950
await page.evaluate(() => document.fonts.ready);
5051

5152
const image = await page.screenshot({ animations: 'disabled', scale: 'css' });
53+
// @ts-ignore
5254
expect(image).toMatchImageSnapshot({
5355
customSnapshotsDir,
5456
customDiffDir,

ui/vite.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const reactHmrWorkaround = {
6565
const splunkPathRewriter = {
6666
name: 'splunk-path-rewriter',
6767
configureServer(server) {
68+
// eslint-disable-next-line consistent-return
6869
server.middlewares.use((req, _res, next) => {
6970
if (!req.url) {
7071
return next();
@@ -148,6 +149,7 @@ export default defineConfig(({ mode }) => {
148149
proxyTargetUrl,
149150
devServerUrl
150151
);
152+
// eslint-disable-next-line no-param-reassign
151153
proxyRes.headers.location = newLocation;
152154
}
153155
});

0 commit comments

Comments
 (0)