From c5f1e6c6e1a490919a13ccc13cb78ea65b60f1eb Mon Sep 17 00:00:00 2001 From: hxtree Date: Sun, 18 Feb 2024 17:49:32 +0000 Subject: [PATCH] fix: design system linting issues Signed-off-by: hxtree --- README.md | 14 +++++--------- .../src/components/Button/Button.tsx | 12 +----------- .../src/components/Button/Button.type.ts | 10 ++++++++++ .../design-system/src/components/Hero/Hero.tsx | 2 +- .../src/components/Typography/Typography.tsx | 16 +--------------- .../src/components/Typography/Typography.type.ts | 15 +++++++++++++++ 6 files changed, 33 insertions(+), 36 deletions(-) create mode 100644 clients/design-system/src/components/Button/Button.type.ts create mode 100644 clients/design-system/src/components/Typography/Typography.type.ts diff --git a/README.md b/README.md index 09c5cdbf5..bf9989a2c 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,16 @@ # @cats-cradle -**AWS Enterprise Monorepo** - [![CI](https://github.com/hxtree/cats-cradle/actions/workflows/on-merge.yml/badge.svg)](https://github.com/hxtree/cats-cradle/actions/workflows/on-merge.yml) [![Code Quality](https://app.codacy.com/project/badge/Grade/8024531285164025aef972fcb059ea74)](https://www.codacy.com/gh/hxtree/cats-cradle/dashboard?utm_source=github.com&utm_medium=referral&utm_content=hxtree/cats-cradle&utm_campaign=Badge_Grade) [![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/8024531285164025aef972fcb059ea74)](https://app.codacy.com/gh/hxtree/cats-cradle) [![Docs](https://github.com/hxtree/cats-cradle/actions/workflows/pages/pages-build-deployment/badge.svg)](https://hxtree.github.io/cats-cradle/) [![GitHub Stars](https://img.shields.io/github/stars/hxtree/cats-cradle?style=social)](https://github.com/hxtree/cats-cradle/stargazers) -Starting afresh or tweaking configurations, this repository embodies an -opinionated approach to organizing layers within an enterprise application. It -delineates the fundamentals for accelerated software development, engineered to -scale and evolve, demonstrating how enterprises can embrace modern DevOps -practices with AWS. Acting as a robust foundation for monorepo architecture, it -houses a range of example packages used in crafting a cooperative RPG, employing -an "eating our own dog food" approach to illustrate its practical application. +Explore this opinionated approach to jumpstart your enterprise application +development. Adopt modern DevOps practices on AWS with a monorepo architecture +like this one to expedite your software pipeline. This repository goes beyond +theory—it's a hands-on showcase, containing diverse placeholder packages +actively employed in developing a cooperative RPG. ## Getting Started diff --git a/clients/design-system/src/components/Button/Button.tsx b/clients/design-system/src/components/Button/Button.tsx index 82047d71b..46ab9b56d 100644 --- a/clients/design-system/src/components/Button/Button.tsx +++ b/clients/design-system/src/components/Button/Button.tsx @@ -1,17 +1,7 @@ import React from 'react'; import Spinner from '../Spinner/Spinner'; import './style.module.scss'; - -export enum ButtonSize { - 'small' = 'small', - 'medium' = 'medium', - 'large' = 'large', -} - -export enum ButtonVariant { - 'default' = 'default', - 'contained' = 'contained', -} +import { ButtonSize, ButtonVariant }from './Button.type'; export type ButtonProps = { loading?: boolean; diff --git a/clients/design-system/src/components/Button/Button.type.ts b/clients/design-system/src/components/Button/Button.type.ts new file mode 100644 index 000000000..cf45bf977 --- /dev/null +++ b/clients/design-system/src/components/Button/Button.type.ts @@ -0,0 +1,10 @@ +export enum ButtonSize { + 'small' = 'small', + 'medium' = 'medium', + 'large' = 'large', +} + +export enum ButtonVariant { + 'default' = 'default', + 'contained' = 'contained', +} diff --git a/clients/design-system/src/components/Hero/Hero.tsx b/clients/design-system/src/components/Hero/Hero.tsx index 7e04f1f98..1f9cf9c2c 100644 --- a/clients/design-system/src/components/Hero/Hero.tsx +++ b/clients/design-system/src/components/Hero/Hero.tsx @@ -1,4 +1,4 @@ -import React, { Children } from 'react'; +import React from 'react'; import './style.module.scss'; export interface HeroProps { diff --git a/clients/design-system/src/components/Typography/Typography.tsx b/clients/design-system/src/components/Typography/Typography.tsx index 67b62d8f5..0de3fe824 100644 --- a/clients/design-system/src/components/Typography/Typography.tsx +++ b/clients/design-system/src/components/Typography/Typography.tsx @@ -1,20 +1,6 @@ +import { TypographyAlign, TypographyVariants} from './Typography.type'; import './style.module.scss' -export enum TypographyVariants { - 'h1' = 'h1', - 'h2' = 'h2', - 'h3' = 'h3', - 'h4' = 'h4', - 'h5' = 'h5', - 'h6' = 'h6', - 'body' = 'body', - 'intro' = 'intro' -} - -export enum TypographyAlign { - 'center' = 'center', - 'left' = 'left', -} export type TypographyProps = { children: React.ReactNode; diff --git a/clients/design-system/src/components/Typography/Typography.type.ts b/clients/design-system/src/components/Typography/Typography.type.ts new file mode 100644 index 000000000..f4fa2245c --- /dev/null +++ b/clients/design-system/src/components/Typography/Typography.type.ts @@ -0,0 +1,15 @@ +export enum TypographyVariants { + 'h1' = 'h1', + 'h2' = 'h2', + 'h3' = 'h3', + 'h4' = 'h4', + 'h5' = 'h5', + 'h6' = 'h6', + 'body' = 'body', + 'intro' = 'intro', +} + +export enum TypographyAlign { + 'center' = 'center', + 'left' = 'left', +}