Skip to content

Commit

Permalink
chore: remove faker
Browse files Browse the repository at this point in the history
  • Loading branch information
rise-erpelding committed Nov 5, 2024
1 parent 91b1d01 commit b69100b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions .storybook/decorators/language.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { allFakers } from "@faker-js/faker";
import { makeDecorator, useEffect } from '@storybook/preview-api';
import { capitalize } from "lodash-es";
import { fetchContainers } from "./helpers";
/* global Typekit */

Expand All @@ -22,13 +20,6 @@ export const withLanguageWrapper = makeDecorator({
const isNotEnglish = lang && lang !== "en-US";
const isRTL = ["ar", "fa", "he"].includes(lang);

// @todo: this can't be used for VRT because the strings are random
// Attach the generator tool to the parameters for use in the story
context.generator = allFakers?.[lang];

// Add a custom generator for titles
context.generator.lorem.title = (count) => capitalize(context.generator.lorem.words(count));

// Add a textDirection property to the globals for use in the story
context.globals.textDirection = isRTL ? "rtl" : "ltr";

Expand Down
1 change: 0 additions & 1 deletion .storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"@etchteam/storybook-addon-status": "^5.0.0",
"@storybook/addon-a11y": "^8.4.1",
"@storybook/addon-actions": "^8.4.1",
"@faker-js/faker": "^8.4.1",
"@storybook/addon-console": "^3.0.0",
"@storybook/addon-designs": "^8.0.4",
"@storybook/addon-docs": "^8.4.1",
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1934,13 +1934,6 @@ __metadata:
languageName: node
linkType: hard

"@faker-js/faker@npm:^8.4.1":
version: 8.4.1
resolution: "@faker-js/faker@npm:8.4.1"
checksum: 10c0/4f2aecddcfdc2cc8b50b2d15d1e37302a7c7a5bbd184ae910a9d271bc11248533ca74dcdd4a9ccbe20410553e7af0f6a4d334c5b955635e09a32ddf4a64942d4
languageName: node
linkType: hard

"@fastify/busboy@npm:^2.0.0":
version: 2.1.1
resolution: "@fastify/busboy@npm:2.1.1"
Expand Down Expand Up @@ -3834,7 +3827,6 @@ __metadata:
"@babel/core": "npm:^7.26.0"
"@chromaui/addon-visual-tests": "npm:^1.0.0"
"@etchteam/storybook-addon-status": "npm:^5.0.0"
"@faker-js/faker": "npm:^8.4.1"
"@spectrum-css/table": "workspace:^"
"@spectrum-css/tokens": "workspace:^"
"@spectrum-css/typography": "workspace:^"
Expand Down

0 comments on commit b69100b

Please sign in to comment.