Skip to content

Commit

Permalink
build: re-enable chromatic stories (#2592)
Browse files Browse the repository at this point in the history
Our chromatic story generation got disabled in the eslint migration. This PR re-enables it.

---------

Co-authored-by: Jeremias Peier <[email protected]>
  • Loading branch information
kyubisation and jeripeierSBB authored Apr 16, 2024
1 parent a420b08 commit ffbcef7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '../src/components/core/styles/global.scss';

const getViewportName = (key: string): string =>
key.replace(/(^SbbBreakpoint|Min$)/g, '').toLowerCase();

const breakpoints = Object.entries(tokens)
.filter(([key]) => key.startsWith('SbbBreakpoint') && key.endsWith('Min'))
.map(([key, value]) => ({ key: getViewportName(key), value: value as number }))
Expand Down
3 changes: 2 additions & 1 deletion scripts/chromatic-stories-generator.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint-disable import-x/default, import-x/no-named-as-default-member */
import { readdirSync, readFileSync, writeFileSync } from 'fs';
import { basename, dirname, join, relative } from 'path';
import { fileURLToPath } from 'url';

import * as ts from 'typescript';
import ts from 'typescript';

const chromaticFile = join(
dirname(fileURLToPath(import.meta.url)),
Expand Down
3 changes: 2 additions & 1 deletion scripts/migrate-ssr-e2e.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable import-x/default, import-x/no-named-as-default-member */
import { readFileSync, writeFileSync } from 'fs';
import { basename, dirname, join, relative } from 'path';

import * as glob from 'glob';
// eslint-disable-next-line @typescript-eslint/naming-convention
import MagicString from 'magic-string';
import * as ts from 'typescript';
import ts from 'typescript';

/*
* Convert e2e test files to use the lit fixture, to enable ssr testing.
Expand Down
3 changes: 2 additions & 1 deletion scripts/migrate-toggle-data-entry.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-disable import-x/default, import-x/no-named-as-default-member */
import { readFileSync, writeFileSync } from 'fs';

import * as glob from 'glob';
// eslint-disable-next-line @typescript-eslint/naming-convention
import MagicString from 'magic-string';
import * as ts from 'typescript';
import ts from 'typescript';

function* iterate(node: ts.Node): Generator<ts.Node, void, unknown> {
yield node;
Expand Down

0 comments on commit ffbcef7

Please sign in to comment.