From 2ef1d5a9bd3f17271db2d0ba06146b7b18b0c920 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Fri, 29 Mar 2024 12:14:06 -0400
Subject: [PATCH 01/59] New translations common.json (French)
---
public/locales/fr/common.json | 186 ++++++++++++++++++++++++++++++++++
1 file changed, 186 insertions(+)
create mode 100644 public/locales/fr/common.json
diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json
new file mode 100644
index 00000000..8d78ed43
--- /dev/null
+++ b/public/locales/fr/common.json
@@ -0,0 +1,186 @@
+{
+ "about": {
+ "campaign": "This trans-led digital campaign organized by InReach and GLAAD aims to showcase positive stories from the diverse trans masculine community and increase access to safe, verified resources through the free InReach App .",
+ "hollister": "
And special thanks to The Hollister Confidence Fund for their support. ",
+ "stats": {
+ "stat1-text": "of trans men and trans masculine youth have considered suicide",
+ "stat1-title": "56%",
+ "stat2-text": "transgender and nonbinary youth have attempted suicide.",
+ "stat2-title": "1 in 5",
+ "stat3-text": "of the U.S. trans population identify as trans men.",
+ "stat3-title": "36%"
+ },
+ "supporting-partners": "Supporting Partners",
+ "trans-people": "Trans people are everywhere. This campaign includes stories from trans men and trans masculine adults across the country."
+ },
+ "act": {
+ "card1": "Participate in this campaign \nWe're currently accepting submissions from trans men and trans masculine adults in the U.S. to share their story. \nClick here to participate. ",
+ "card2": "Help increase resource access for the diverse trans masculine community \nInReach is always looking for new resource suggestions to help expand our free app. Know an organization that is affirming and safe for trans masculine people? \nYou can suggest a resource to be listed on the free InReach App here. ",
+ "card3": "Access affirming resources, 24/7 \nUse the free InReach App to access safe, independently verified legal, medical, mental health and social services near you. Click here to find resources. Stay tuned for our new trans men and trans masculine community 'sort by' filter coming soon! "
+ },
+ "artist-credit": "Character drawings by Joey Borrelli.",
+ "back": "Previous",
+ "donate": "Donate",
+ "errors": {
+ "consent-all-3": "You must consent to all three.",
+ "min-21": "You must be at least 21 years old to participate.",
+ "other-val": "Please specify",
+ "select-min-one": "Select at least one item",
+ "verify-all-3": "You must verify that all three are true."
+ },
+ "logo-alt": "InReach & GLAAD #TransMascFutures logo",
+ "main-page": {
+ "tagline1": "Trans men and trans masculine adults share their stories of trans joy.",
+ "tagline2": "Trans futures are InReach."
+ },
+ "nav": {
+ "about": "About",
+ "act": "Act",
+ "find-resources": "Find resources",
+ "gallery": "Gallery",
+ "home": "Home",
+ "share": "Share",
+ "share-your-story": "Share your story",
+ "stories": "Stories",
+ "switch-lang": "Haz clic aquí para cambiar a español.",
+ "switch-lang-short": "Cambiar a español"
+ },
+ "next": "Next",
+ "page-title": {
+ "gallery": "Trans Joy: Gallery",
+ "general": "#TransMascFutures - InReach x GLAAD",
+ "general-template": "{{page}} - #TransMascFutures - InReach x GLAAD"
+ },
+ "participate": "Click here to participate",
+ "see-x-stories": "See {{category}} Stories",
+ "share": {
+ "download-button": "Download Kit",
+ "list1": "Multiple 1080 x 1080 PNG graphics",
+ "list2": "PDF document with sample sharing language",
+ "press-release": "Press Release",
+ "subtitle": "For your sharing convenience:",
+ "title": "Use our #TransMascFutures social media toolkit."
+ },
+ "story": {
+ "prompt1": "The first moment I could see my future as a trans man or trans masculine person was...",
+ "prompt2": "Resources that helped me..."
+ },
+ "story-gallery": {
+ "bipoc": "Trans Masc + BIPOC + Proud",
+ "disabled": "Trans Masc + Disabled + Proud",
+ "elder": "Trans Masc + Elder + Proud",
+ "gallery-joy": "Trans joy: Gallery",
+ "immigrant": "Trans Masc + Immigrant + Proud",
+ "queer": "Trans Masc + Queer + Proud",
+ "transman": "Trans man + Proud",
+ "transmasc": "Trans Masc / Nonbinary + Proud"
+ },
+ "submit": "Submit",
+ "survey-form": {
+ "eligiblity": "Participant eligiblity critera: \nYou are a trans man or a trans masculine person \nYou are 21 years old or over \nYou are currently living anywhere in the United States
",
+ "intro": "InReach is partnering with GLAAD to organize #TransMascFutures. This trans-led digital campaign aims to showcase positive stories from the diverse trans masculine community and increase access to safe, verified resources through the InReach App. The #TransMascFutures Campaign launched on June 7th, 2023. Submit this form to add your story to the campaign website.",
+ "prefer-not-answer": "Prefer not to answer",
+ "q1": "You verify that the following is true (check all that apply):",
+ "q1-opts": {
+ "00_transmasc": "I am a trans man or trans masculine person",
+ "01_over21": "I am at least 21 years old",
+ "02_us": "I currently live in the United States"
+ },
+ "q10": "Which gender-related terms best describe your personal identity?(Select all that apply.) ",
+ "q10-opts": {
+ "00_transman": "Trans man or male",
+ "01_transmasc": "Trans Masculine ",
+ "02_nonbinary": "Nonbinary",
+ "03_genderfluid": "Genderfluid or Genderqueer",
+ "04_afab": "Assigned Female at Birth (AFAB)",
+ "05_other": "Other (please specify)"
+ },
+ "q11": "Select how you describe your sexual orientation.(Select all that apply.) ",
+ "q11-opts": {
+ "00_straight": "Straight/Heterosexual",
+ "01_gay": "Gay",
+ "02_lesbian": "Lesbian",
+ "03_bisexual": "Bisexual",
+ "04_pansexual": "Pansexual",
+ "05_asexual": "Asexual/Demisexual/Ace",
+ "06_queer": "Queer",
+ "07_other": "Other (please specify)"
+ },
+ "q12": "Select how you identify your race/ethnicity.(Select all that apply.) ",
+ "q12-opts": {
+ "00_indigenous": "American Indian/Native American/Indigenous People",
+ "01_asian": "Asian/Asian American",
+ "02_biracial": "Biracial/Multiracial",
+ "03_black": "Black/African American",
+ "04_latinx": "Latino/a/x/e/Hispanic",
+ "05_AME": "Middle Eastern/North African",
+ "06_hawaii-pacific": "Native Hawaiian/Pacific Islander",
+ "07_south-asian": "South Asian",
+ "08_white": "White",
+ "09_no-answer": "Prefer not to answer",
+ "10_other": "Other (please specify)"
+ },
+ "q13": "Select which U.S. region you live in.",
+ "q13-opts": {
+ "00_northeast": "Northeast",
+ "01_midwest": "Midwest",
+ "02_southeast": "Southeast",
+ "03_southwest": "Southwest",
+ "04_west": "West Coast ",
+ "05_territories": "U.S. Territories ",
+ "06_no-answer": "Prefer not to answer"
+ },
+ "q14": "Select which U.S. state you live in.",
+ "q15": "Do you identify as any of the following?(Select all that apply.) ",
+ "q15-opts": {
+ "00_asylum-seeker": "Asylum seeker",
+ "01_asylee": "Asylee (received asylum)",
+ "02_daca": "DACA recipient",
+ "03_resettled": "Resettled refugee",
+ "04_other": "Other immigrant",
+ "05_no-answer": "Prefer not to answer",
+ "06_none": "I do not identify as any of these"
+ },
+ "q2": "I consent to having my submission shared by InReach via",
+ "q2-opts": {
+ "00_website": "#TransMascFutures Campaign Website",
+ "01_social": "Social Media (@weareinreach across socials) ",
+ "02_media": "Media/Press"
+ },
+ "q3": "Please provide your email address if you would like to stay updated on the status of the #TransMascFutures Campaign.",
+ "q4": " Please enter your name as you would like it to appear on the campaign website. (Only a first name will be displayed. Aliases are welcome.)",
+ "q5": "I identify as:(Please select all that apply to you) ",
+ "q5-opts": {
+ "00_transman": "Trans Man ",
+ "01_transmasc": "Nonbinary/Trans Masculine",
+ "02_queer": "Queer (i.e., identify your sexual orientation as something other than heterosexual)",
+ "03_elder": "Elder (i.e., came out or transitioned before the year 2000)",
+ "04_disabled": "Disabled (i.e., physical, mental, invisible disability",
+ "05_immigrant": "Immigrant (i.e., asylum seeker, asylee, resettled refugee, DACA recipient, etc.)",
+ "06_bipoc": "BIPOC (i.e., non-white, Person of Color)"
+ },
+ "q6": "How old are you?",
+ "q7": "Select which pronouns you use:",
+ "q7-opts": {
+ "00_he": "He/Him/His",
+ "01_they": "They/Them/Theirs",
+ "02_ze": "Ze/Hir/Hirs",
+ "03_xe": "Xe/Xem/Xyr",
+ "04_ey": "Ey/Em/Eir",
+ "05_none": "No Pronouns",
+ "06_any": "Any Pronouns",
+ "07_other": "Other (please specify)"
+ },
+ "q8": "Describe the first moment you could see your future as a trans man or trans masculine person.",
+ "q9": "What resources have helped you see your future as a trans man or trans masculine adult?*Note: To maximize safety, please refrain from sharing personally identifying information, such as naming specific doctors or small clinics. ",
+ "section2": "This section will ask you questions about yourself and your experiences. Please limit your responses to each question to 250 words or less. ",
+ "section3": "This section helps to ensure diversity within our responses to represent the range of differences in trans masculine experiences.",
+ "step1": "Campaign Participation Requirements and Consent",
+ "step2": "Campaign Story Questions",
+ "step3": "Demographic Information (optional)",
+ "step4": "Confirmation",
+ "switch-lang": "Haz clic aquí para la versión en español de la encuesta.",
+ "thank-you": "Thank you for sharing your story! Assuming your submission meets our participant eligibility criteria, we will add your story to our campaign website shortly. In the meantime, be sure to follow @weareinreach on social media for updates and download our campaign social media toolkit to share the campaign. If you have any questions, please email marketing@inreach.org."
+ },
+ "vercel": "Powered by Vercel"
+}
\ No newline at end of file
From 44a18f2d0d579d2cb2f8de0c43a71c6c7591647c Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:41:06 +0000
Subject: [PATCH 02/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 710f936346e337f02f6b95d1c1e3a8cb7534f959 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:41:22 +0000
Subject: [PATCH 03/59] style: format code with Prettier
This commit fixes the style issues introduced in 44a18f2 according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 7f696ae490c43d6c324c3f74e06a9c895f9ceb19 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:42:04 +0000
Subject: [PATCH 04/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From b58039b515db7c153900be66518f30b824102b82 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:42:19 +0000
Subject: [PATCH 05/59] style: format code with Prettier
This commit fixes the style issues introduced in 7f696ae according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From a1e7e9f43a2a30250c6233b8cac07382dc4bf961 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:43:01 +0000
Subject: [PATCH 06/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From b1956837bd80a0aee2b3534211a76897ef9060c9 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:43:23 +0000
Subject: [PATCH 07/59] style: format code with Prettier
This commit fixes the style issues introduced in a1e7e9f according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 90fecff37d320be8877a50f462e6234606791b49 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:44:03 +0000
Subject: [PATCH 08/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 7049589293be7654a8cad15a28a8919ca23469ea Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:44:19 +0000
Subject: [PATCH 09/59] style: format code with Prettier
This commit fixes the style issues introduced in 90fecff according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 34348dbf22d2ec34447eadb977607e5528717a1f Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:45:08 +0000
Subject: [PATCH 10/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From dfd343226710dfb126f9a5eb910937e3a47c5aff Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:45:25 +0000
Subject: [PATCH 11/59] style: format code with Prettier
This commit fixes the style issues introduced in 34348db according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 6ee924d8bbbf9eb17cafc22d9d3f3e0addd7832e Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:46:13 +0000
Subject: [PATCH 12/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 0dcd651a2a09ed94d6b72652e284512aa11db550 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:46:39 +0000
Subject: [PATCH 13/59] style: format code with Prettier
This commit fixes the style issues introduced in 6ee924d according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 822055c221834b2ae6b7823364bbbb40039d3b10 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:47:23 +0000
Subject: [PATCH 14/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From c1c87f01bd2da56e1e5ed49a038a43d0e692126d Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:47:38 +0000
Subject: [PATCH 15/59] style: format code with Prettier
This commit fixes the style issues introduced in 822055c according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 0871324875c8f1940267b89038656ead341c5e34 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:48:18 +0000
Subject: [PATCH 16/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 87e7f31be9734b82baecf1002642acb2436b4bcd Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:48:37 +0000
Subject: [PATCH 17/59] style: format code with Prettier
This commit fixes the style issues introduced in 0871324 according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 981acb959872319804e62bc95f9b5d8d70025b72 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:49:18 +0000
Subject: [PATCH 18/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From f6f1601cbfc617f7cd8ffd45c2cf23022283b1eb Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:49:32 +0000
Subject: [PATCH 19/59] style: format code with Prettier
This commit fixes the style issues introduced in 981acb9 according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 14107cc13a4882294df67042a8dfe4c035353de1 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:50:13 +0000
Subject: [PATCH 20/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 0f53db09368fe4d70ee649e31d9d72a156223cd4 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:50:29 +0000
Subject: [PATCH 21/59] style: format code with Prettier
This commit fixes the style issues introduced in 14107cc according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From daa77d309327dcebcc3dffe03ad389aa18058c67 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:51:10 +0000
Subject: [PATCH 22/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From 0aa57d6c080a17faacfea5507e0933a5bcbb9e5e Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:51:26 +0000
Subject: [PATCH 23/59] style: format code with Prettier
This commit fixes the style issues introduced in daa77d3 according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit = {
+};
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-}
+};
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- )
-}
+ );
+};
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-]
+];
type DecoratorProps = {
- children: ReactNode
-}
+ children: ReactNode;
+};
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 17572a98..10f72349 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from 'listr2'
+} from "listr2";
-import * as jobList from './data-migrations'
+import * as jobList from "./data-migrations";
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob['rendererOptions']
+} satisfies ListrJob["rendererOptions"];
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-})
+});
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: 'wrap',
+ formatOutput: "wrap",
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,17 +42,21 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- }
-)
+ },
+);
-jobs.run()
+jobs.run();
export type Context = {
- error?: boolean
-}
-export type PassedTask = ListrTaskWrapper
-export type ListrJob = ListrTaskObj
+ error?: boolean;
+};
+export type PassedTask = ListrTaskWrapper<
+ Context,
+ ListrDefaultRenderer,
+ ListrDefaultRenderer
+>;
+export type ListrJob = ListrTaskObj;
export type ListrTask = (
ctx: Context,
- task: PassedTask
-) => void | Promise> | Listr
+ task: PassedTask,
+) => void | Promise> | Listr;
From 994edfceab3d09fad0352ea59238adfa6d65a4f6 Mon Sep 17 00:00:00 2001
From: "InReach [bot]" <108850934+InReach-svc@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:52:07 +0000
Subject: [PATCH 24/59] chore: lint & format
Signed-off-by: InReach [bot] <108850934+InReach-svc@users.noreply.github.com>
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 +++++++++++++----------------
3 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 6addc407..429d8ad4 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from "@storybook/nextjs";
-import { merge } from "merge-anything";
+import { type StorybookConfig } from '@storybook/nextjs'
+import { merge } from 'merge-anything'
-import { dirname, join } from "path";
+import { dirname, join } from 'path'
const config: StorybookConfig = {
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
+ stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: [
{
- from: "../public",
- to: "/",
+ from: '../public',
+ to: '/',
},
],
addons: [
- getAbsolutePath("@storybook/addon-a11y"),
- getAbsolutePath("@storybook/addon-links"),
- getAbsolutePath("@storybook/addon-essentials"),
- getAbsolutePath("@storybook/addon-interactions"),
+ getAbsolutePath('@storybook/addon-a11y'),
+ getAbsolutePath('@storybook/addon-links'),
+ getAbsolutePath('@storybook/addon-essentials'),
+ getAbsolutePath('@storybook/addon-interactions'),
],
framework: {
- name: "@storybook/nextjs",
+ name: '@storybook/nextjs',
options: {},
},
docs: {
- autodocs: "tag",
+ autodocs: 'tag',
},
typescript: {
check: true,
- reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
+ reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- };
- const mergedConfig = merge(config, configAdditions);
- return mergedConfig;
+ }
+ const mergedConfig = merge(config, configAdditions)
+ return mergedConfig
},
-};
+}
-export default config;
+export default config
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, "package.json")));
+ return dirname(require.resolve(join(value, 'package.json')))
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 14d43838..e01ec016 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from "@mantine/core";
-import { type MantineProviderProps } from "@mantine/core";
-import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
-import { type StoryFn } from "@storybook/react";
-import { type ReactNode } from "react";
-import { I18nextProvider } from "react-i18next";
+import { Global, MantineProvider } from '@mantine/core'
+import { type MantineProviderProps } from '@mantine/core'
+import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
+import { type StoryFn } from '@storybook/react'
+import { type ReactNode } from 'react'
+import { I18nextProvider } from 'react-i18next'
-import { i18n, i18nLocales } from "./i18next";
-import { storybookFont } from "../src/styles";
-import { theme } from "../src/styles/theme";
+import { i18n, i18nLocales } from './i18next'
+import { storybookFont } from '../src/styles'
+import { theme } from '../src/styles/theme'
export const parameters = {
- layout: "centered",
+ layout: 'centered',
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: "en",
+ locale: 'en',
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-};
-const mantineProviderProps: Omit = {
+}
+const mantineProviderProps: Omit = {
withCSSVariables: false,
withGlobalStyles: true,
withNormalizeCSS: false,
-};
+}
const ThemeWrapper = ({ children }: DecoratorProps) => {
return (
@@ -38,8 +38,8 @@ const ThemeWrapper = ({ children }: DecoratorProps) => {
{children}
{/* */}
- );
-};
+ )
+}
export const decorators = [
(Story: StoryFn) => (
@@ -47,8 +47,8 @@ export const decorators = [
),
-];
+]
type DecoratorProps = {
- children: ReactNode;
-};
+ children: ReactNode
+}
diff --git a/prisma/dataMigrationRunner.ts b/prisma/dataMigrationRunner.ts
index 10f72349..17572a98 100644
--- a/prisma/dataMigrationRunner.ts
+++ b/prisma/dataMigrationRunner.ts
@@ -8,9 +8,9 @@ import {
type ListrTaskWrapper,
PRESET_TIMER,
PRESET_TIMESTAMP,
-} from "listr2";
+} from 'listr2'
-import * as jobList from "./data-migrations";
+import * as jobList from './data-migrations'
/**
* Job Runner
@@ -22,18 +22,18 @@ const rendererOptions = {
outputBar: 10,
persistentOutput: true,
timer: PRESET_TIMER,
-} satisfies ListrJob["rendererOptions"];
+} satisfies ListrJob['rendererOptions']
const injectOptions = (job: ListrJob): ListrJob => ({
...job,
rendererOptions,
-});
+})
const jobs = new Listr(
Object.values(jobList).map((job) => injectOptions(job)),
{
rendererOptions: {
- formatOutput: "wrap",
+ formatOutput: 'wrap',
timer: PRESET_TIMER,
suffixSkips: true,
},
@@ -42,21 +42,17 @@ const jobs = new Listr(
timestamp: PRESET_TIMESTAMP,
},
exitOnError: false,
- },
-);
+ }
+)
-jobs.run();
+jobs.run()
export type Context = {
- error?: boolean;
-};
-export type PassedTask = ListrTaskWrapper<
- Context,
- ListrDefaultRenderer,
- ListrDefaultRenderer
->;
-export type ListrJob = ListrTaskObj;
+ error?: boolean
+}
+export type PassedTask = ListrTaskWrapper
+export type ListrJob = ListrTaskObj
export type ListrTask = (
ctx: Context,
- task: PassedTask,
-) => void | Promise> | Listr;
+ task: PassedTask
+) => void | Promise> | Listr
From c12fb0d5f4eb6a62d1e87df5497ea27f9074e4f5 Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 11 Apr 2024 16:52:25 +0000
Subject: [PATCH 25/59] style: format code with Prettier
This commit fixes the style issues introduced in 994edfc according to the output
from Prettier.
Details: https://github.com/weareinreach/TransMascFutures/pull/375
---
.storybook/main.ts | 38 +++++++++++++++++------------------
.storybook/preview.tsx | 38 +++++++++++++++++------------------
prisma/dataMigrationRunner.ts | 32 ++++++++++++++++-------------
3 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/.storybook/main.ts b/.storybook/main.ts
index 429d8ad4..6addc407 100644
--- a/.storybook/main.ts
+++ b/.storybook/main.ts
@@ -1,32 +1,32 @@
-import { type StorybookConfig } from '@storybook/nextjs'
-import { merge } from 'merge-anything'
+import { type StorybookConfig } from "@storybook/nextjs";
+import { merge } from "merge-anything";
-import { dirname, join } from 'path'
+import { dirname, join } from "path";
const config: StorybookConfig = {
- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: [
{
- from: '../public',
- to: '/',
+ from: "../public",
+ to: "/",
},
],
addons: [
- getAbsolutePath('@storybook/addon-a11y'),
- getAbsolutePath('@storybook/addon-links'),
- getAbsolutePath('@storybook/addon-essentials'),
- getAbsolutePath('@storybook/addon-interactions'),
+ getAbsolutePath("@storybook/addon-a11y"),
+ getAbsolutePath("@storybook/addon-links"),
+ getAbsolutePath("@storybook/addon-essentials"),
+ getAbsolutePath("@storybook/addon-interactions"),
],
framework: {
- name: '@storybook/nextjs',
+ name: "@storybook/nextjs",
options: {},
},
docs: {
- autodocs: 'tag',
+ autodocs: "tag",
},
typescript: {
check: true,
- reactDocgen: 'react-docgen-typescript', //'react-docgen-typescript',
+ reactDocgen: "react-docgen-typescript", //'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
shouldExtractValuesFromUnion: true,
@@ -42,14 +42,14 @@ const config: StorybookConfig = {
// 'next-i18next': 'react-i18next',
},
},
- }
- const mergedConfig = merge(config, configAdditions)
- return mergedConfig
+ };
+ const mergedConfig = merge(config, configAdditions);
+ return mergedConfig;
},
-}
+};
-export default config
+export default config;
function getAbsolutePath(value: string): string {
- return dirname(require.resolve(join(value, 'package.json')))
+ return dirname(require.resolve(join(value, "package.json")));
}
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index e01ec016..14d43838 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -1,16 +1,16 @@
-import { Global, MantineProvider } from '@mantine/core'
-import { type MantineProviderProps } from '@mantine/core'
-import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
-import { type StoryFn } from '@storybook/react'
-import { type ReactNode } from 'react'
-import { I18nextProvider } from 'react-i18next'
+import { Global, MantineProvider } from "@mantine/core";
+import { type MantineProviderProps } from "@mantine/core";
+import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
+import { type StoryFn } from "@storybook/react";
+import { type ReactNode } from "react";
+import { I18nextProvider } from "react-i18next";
-import { i18n, i18nLocales } from './i18next'
-import { storybookFont } from '../src/styles'
-import { theme } from '../src/styles/theme'
+import { i18n, i18nLocales } from "./i18next";
+import { storybookFont } from "../src/styles";
+import { theme } from "../src/styles/theme";
export const parameters = {
- layout: 'centered',
+ layout: "centered",
controls: {
matchers: {
color: /(background|color)$/i,
@@ -18,17 +18,17 @@ export const parameters = {
},
},
i18n,
- locale: 'en',
+ locale: "en",
locales: i18nLocales,
viewport: {
viewports: INITIAL_VIEWPORTS,
},
-}
-const mantineProviderProps: Omit