diff --git a/web/eslint.config.js b/web/eslint.config.js
index 905166cd8..57b65d088 100644
--- a/web/eslint.config.js
+++ b/web/eslint.config.js
@@ -56,6 +56,23 @@ export default defineConfig(
}
},
{
- rules: {}
+ // fixtures feed stories and nothing else. without this the app can import
+ // them and ship sample data, which is how the notifications page got its
+ // mock feed
+ files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js", "**/*.ts", "**/*.js"],
+ ignores: ["**/*.stories.svelte"],
+ rules: {
+ "no-restricted-imports": [
+ "error",
+ {
+ patterns: [
+ {
+ group: ["$fixtures", "$fixtures/*", "**/src/fixtures", "**/src/fixtures/*"],
+ message: "fixtures are storybook input: import them from a *.stories.svelte file."
+ }
+ ]
+ }
+ ]
+ }
}
);
diff --git a/web/src/lib/components/comment/sampleComments.ts b/web/src/fixtures/comments.ts
similarity index 98%
rename from web/src/lib/components/comment/sampleComments.ts
rename to web/src/fixtures/comments.ts
index c1a07be38..9241a5d42 100644
--- a/web/src/lib/components/comment/sampleComments.ts
+++ b/web/src/fixtures/comments.ts
@@ -1,7 +1,7 @@
// real comment data pulled from tangled.org/tangled.org/core/issues/245, used across
// the comment stories so the fixtures live in one place.
import type { MarkupContext } from "$lib/markup";
-import type { CommentThread, CommentView } from "./comments";
+import type { CommentThread, CommentView } from "$lib/components/comment/comments";
export const sampleMarkup: MarkupContext = {
repo: "tangled.org/core",
diff --git a/web/src/lib/components/repo/pipelines/mock.ts b/web/src/fixtures/pipelines.ts
similarity index 97%
rename from web/src/lib/components/repo/pipelines/mock.ts
rename to web/src/fixtures/pipelines.ts
index a290ecace..4dbd7c036 100644
--- a/web/src/lib/components/repo/pipelines/mock.ts
+++ b/web/src/fixtures/pipelines.ts
@@ -1,9 +1,9 @@
-// fixture pipelines for the stories and the commit list, the pipelines tab
-// reads from a spindle now
+// fixture pipelines for the pipeline and commit-list stories. the app reads real
+// runs from a spindle, so nothing here ever reaches the bundle
import type { PipelineSummary } from "$lib/components/repo/types";
import type { LogControl, LogFrame } from "$lib/api/spindleLogs";
-import { createLogAccumulator, type LogStep } from "./logs";
+import { createLogAccumulator, type LogStep } from "$lib/components/repo/pipelines/logs";
const minutes = (n: number) => n * 60_000;
diff --git a/web/src/lib/components/timeline/mock.ts b/web/src/fixtures/timeline.ts
similarity index 100%
rename from web/src/lib/components/timeline/mock.ts
rename to web/src/fixtures/timeline.ts
diff --git a/web/src/lib/components/comment/Comment.stories.svelte b/web/src/lib/components/comment/Comment.stories.svelte
index 1516af701..898b1157f 100644
--- a/web/src/lib/components/comment/Comment.stories.svelte
+++ b/web/src/lib/components/comment/Comment.stories.svelte
@@ -1,7 +1,7 @@
diff --git a/web/src/lib/components/repo/CommitLogView.stories.svelte b/web/src/lib/components/repo/CommitLogView.stories.svelte
index 0a1367d71..aba07d082 100644
--- a/web/src/lib/components/repo/CommitLogView.stories.svelte
+++ b/web/src/lib/components/repo/CommitLogView.stories.svelte
@@ -2,7 +2,7 @@
import { defineMeta, type StoryContext } from "@storybook/addon-svelte-csf";
import { expect, fn, userEvent } from "storybook/test";
import CommitLogView from "./CommitLogView.svelte";
- import { pipelinesByCommitHash } from "./pipelines/mock";
+ import { pipelinesByCommitHash } from "$fixtures/pipelines";
import type { CommitSummary } from "./types";
const commit = (index: number): CommitSummary => ({
diff --git a/web/src/lib/components/repo/RepoIndexView.stories.svelte b/web/src/lib/components/repo/RepoIndexView.stories.svelte
index bdc649432..35b79d7ca 100644
--- a/web/src/lib/components/repo/RepoIndexView.stories.svelte
+++ b/web/src/lib/components/repo/RepoIndexView.stories.svelte
@@ -1,7 +1,7 @@