Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make script names consistent #1263

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: yarn

- name: Build Storybook
run: yarn build-storybook
run: yarn build:storybook

- uses: chromaui/action@v1
with:
Expand Down
33 changes: 21 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@
"access": "public"
},
"scripts": {
"chromatic": "npx chromatic --project-token $CHROMATIC_TOKEN --exit-zero-on-changes",
"lint": "yarn run tsc && yarn run eslint",
"eslint": "eslint --config ./.eslintrc .'*/**/*.{js,ts,tsx}'",
"lint:fix": "yarn run eslint --fix",
"start": "concurrently \"yarn build:watch\" \"start-storybook -p 9999\"",
"new": "plop",

"start": "concurrently \"yarn build --watch\" \"start-storybook -p 9999\"",
"start:e2e": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",

"build": "rollup -c",
"build:watch": "yarn build --watch",
"build-storybook": "build-storybook",
"e2e:start": "yarn concurrently --kill-others \"yarn start --ci\" \"yarn wait-on http://localhost:9999 && cypress open\"",
"e2e:test": "yarn build-storybook && yarn concurrently --success \"first\" --kill-others \"yarn http-server -p 9999 ./storybook-static\" \"yarn wait-on http://localhost:9999 && yarn cypress run\"",
"test": "yarn lint && yarn jest && yarn e2e:test",
"new": "plop"
"build:storybook": "build-storybook",

"check": "yarn check:types && yarn check:lint && yarn check:format",
"check:types": "tsc && cd cypress && tsc",
"check:lint": "eslint --config ./.eslintrc .'*/**/*.{js,ts,tsx}'",
"check:format": "prettier -c **/*.{ts,tsx,js}",

"fix": "yarn fix:lint && yarn fix:format",
"fix:lint": "yarn check:lint --fix",
"fix:format": "prettier -w **/*.{ts,tsx,js}",

"test": "yarn test:components && yarn run test:e2e",
"test:components": "jest",
"test:e2e": "yarn build:storybook && yarn concurrently --success \"first\" --kill-others \"yarn http-server -p 9999 ./storybook-static\" \"yarn wait-on http://localhost:9999 && yarn cypress run\"",
"test:visual": "npx chromatic --project-token $CHROMATIC_TOKEN --exit-zero-on-changes"
},
"license": "MIT",
"author": "Nulogy <[email protected]> (https://github.com/nulogy)",
Expand Down Expand Up @@ -164,7 +173,7 @@
},
"husky": {
"hooks": {
"pre-push": "yarn lint"
"pre-push": "yarn check"
}
},
"jest": {
Expand Down
4 changes: 2 additions & 2 deletions src/Banner/Banner.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ const menuData = {
{ name: "Manage account", href: "/" },
],
},
]
}
],
};
2 changes: 1 addition & 1 deletion src/Layout/Header.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import SummaryItem from "../Summary/SummaryItem";
import SummaryDivider from "../Summary/SummaryDivider";
import DropdownMenu from "../DropdownMenu/DropdownMenu";
import { theme } from "..";
import numberFromDimension from "../utils/numberFromDimension"
import numberFromDimension from "../utils/numberFromDimension";

export const Default = () => (
<Header
Expand Down
6 changes: 1 addition & 5 deletions src/Modal/Modal.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,7 @@ export const WithParentSelector = () => {

return (
<div id={id}>
<Modal
title="Modal Title"
footerContent={modalButtons}
parentSelector={() => document.getElementById(id)}
>
<Modal title="Modal Title" footerContent={modalButtons} parentSelector={() => document.getElementById(id)}>
Content
</Modal>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ToastContainer/ToastFunction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { toastAnimationConfig } from "../Toast/Toast";

// We remove the "as" prop because the Alert is wrapped with a styled component
// resulting in a TypeScript overload error.
type AlertProps = Omit<OriginalAlertProps, "as">
type AlertProps = Omit<OriginalAlertProps, "as">;

type ToastFunction = (children: React.ReactNode, props?: AlertProps, options?: ToastOptions) => void;

Expand All @@ -19,7 +19,7 @@ type ToastFunctions = {
warning: ToastFunction;
};

type CustomToastProps = { id: string, isVisible: boolean } & AlertProps
type CustomToastProps = { id: string; isVisible: boolean } & AlertProps;

const CustomToast: React.FC<CustomToastProps> = ({ isVisible, id, children, ...props }) => {
const handleClose = () => {
Expand Down