From 1db4319adbcc86639fd213281f679f6c71e7c7b2 Mon Sep 17 00:00:00 2001 From: impelcrypto Date: Thu, 18 Jan 2024 18:33:59 +0800 Subject: [PATCH] config: added .prettierc --- .prettierrc | 6 ++ packages/Modals/index.ts | 28 +++---- packages/export_type.ts | 153 ++++++++++++++++++--------------------- packages/index.ts | 28 +++---- 4 files changed, 102 insertions(+), 113 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..980bd33 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "printWidth": 100, + "singleQuote": true, + "semi": true, + "tabWidth": 2 +} diff --git a/packages/Modals/index.ts b/packages/Modals/index.ts index d3fe13f..8bbd2ff 100644 --- a/packages/Modals/index.ts +++ b/packages/Modals/index.ts @@ -1,23 +1,17 @@ -import { App, Plugin } from "vue"; -import SimpleModal from "./src/SimpleModal.vue"; -import ModalDrawer from "./src/ModalDrawer.vue"; -import DefaultModal from "./src/DefaultModal.vue"; -import { fadeDuration } from "./src/index"; -import IconBackWithColor from "./src/IconBackWithColor.vue"; +import { App, Plugin } from 'vue'; +import SimpleModal from './src/SimpleModal.vue'; +import ModalDrawer from './src/ModalDrawer.vue'; +import DefaultModal from './src/DefaultModal.vue'; +import { fadeDuration } from './src/index'; +import IconBackWithColor from './src/IconBackWithColor.vue'; export const ModalsPlugin: Plugin = { install(app: App) { - app.component("astar-simple-modal", SimpleModal); - app.component("astar-modal-drawer", ModalDrawer); - app.component("astar-default-modal", DefaultModal); - app.component("astar-icon-back-with-color", IconBackWithColor); + app.component('astar-simple-modal', SimpleModal); + app.component('astar-modal-drawer', ModalDrawer); + app.component('astar-default-modal', DefaultModal); + app.component('astar-icon-back-with-color', IconBackWithColor); }, }; -export { - SimpleModal, - ModalDrawer, - DefaultModal, - fadeDuration, - IconBackWithColor, -}; +export { SimpleModal, ModalDrawer, DefaultModal, fadeDuration, IconBackWithColor }; diff --git a/packages/export_type.ts b/packages/export_type.ts index 3282ead..5dcf1b6 100644 --- a/packages/export_type.ts +++ b/packages/export_type.ts @@ -1,11 +1,5 @@ -import { - Button, - IrregularButton, - RadioBtn, - SmallButton, - TextButton, -} from "./Buttons"; -import { ConnectionIndicator, Header } from "./Header"; +import { Button, IrregularButton, RadioBtn, SmallButton, TextButton } from './Buttons'; +import { ConnectionIndicator, Header } from './Header'; import { Icon3dots, IconAccountSample, @@ -59,80 +53,75 @@ import { IconVert, IconWallet, IconYoutube, -} from "./Icons"; -import { - DefaultModal, - ModalDrawer, - SimpleModal, - IconBackWithColor, -} from "./Modals"; -import { Spinner } from "./Spinner"; -import { Text } from "./Text"; +} from './Icons'; +import { DefaultModal, ModalDrawer, SimpleModal, IconBackWithColor } from './Modals'; +import { Spinner } from './Spinner'; +import { Text } from './Text'; export interface GlobalComponents { - "astar-button": typeof Button; - "astar-irregular-button": typeof IrregularButton; - "astar-radio-btn": typeof RadioBtn; - "astar-small-button": typeof SmallButton; - "astar-text-button": typeof TextButton; - "astar-connection-indicator": typeof ConnectionIndicator; - "astar-header": typeof Header; - "astar-icon-3dots": typeof Icon3dots; - "astar-icon-account-sample": typeof IconAccountSample; - "astar-icon-arrow-left": typeof IconArrowLeft; - "astar-icon-arrow-left-long": typeof IconArrowLeftLong; - "astar-icon-arrow-right": typeof IconArrowRight; - "astar-icon-arrow-right-long": typeof IconArrowRightLong; - "astar-icon-assets": typeof IconAssets; - "astar-icon-base": typeof IconBase; - "astar-icon-bridge": typeof IconBridge; - "astar-icon-circle-check": typeof IconCircleCheck; - "astar-icon-close": typeof IconClose; - "astar-icon-community": typeof IconCommunity; - "astar-icon-copy": typeof IconCopy; - "astar-icon-dapp-staking": typeof IconDappStaking; - "astar-icon-dashboard": typeof IconDashboard; - "astar-icon-desktop": typeof IconDesktop; - "astar-icon-discord": typeof IconDiscord; - "astar-icon-docs": typeof IconDocs; - "astar-icon-document": typeof IconDocument; - "astar-icon-ecosystem": typeof IconEcosystem; - "astar-icon-expand": typeof IconExpand; - "astar-icon-external-link": typeof IconExternalLink; - "astar-icon-facebook": typeof IconFacebook; - "astar-icon-forum": typeof IconForum; - "astar-icon-github": typeof IconGithub; - "astar-icon-group": typeof IconGroup; - "astar-icon-geko": typeof IconHelp; - "astar-icon-hide": typeof IconHide; - "astar-icon-history": typeof IconHistory; - "astar-icon-home": typeof IconHome; - "astar-icon-instagram": typeof IconInstagram; - "astar-icon-linkedin": typeof IconLinkedIn; - "astar-icon-network": typeof IconNetwork; - "astar-icon-outline-moon": typeof IconOutlineMoon; - "astar-icon-outline-sun": typeof IconOutlineSun; - "astar-icon-person": typeof IconPerson; - "astar-icon-play": typeof IconPlay; - "astar-icon-plus": typeof IconPlus; - "astar-icon-reddit": typeof IconReddit; - "astar-icon-search": typeof IconSearch; - "astar-icon-side-nft": typeof IconSideNFT; - "astar-icon-solid-selector": typeof IconSolidSelector; - "astar-icon-star": typeof IconStar; - "astar-icon-sync": typeof IconSync; - "astar-icon-telegram": typeof IconTelegram; - "astar-icon-transfer": typeof IconTransfer; - "astar-icon-twitter": typeof IconTwitter; - "astar-icon-unhide": typeof IconUnhide; - "astar-icon-verified": typeof IconVerified; - "astar-icon-vert": typeof IconVert; - "astar-icon-wallet": typeof IconWallet; - "astar-icon-youtube": typeof IconYoutube; - "astar-default-modal": typeof DefaultModal; - "astar-modal-drawer": typeof ModalDrawer; - "astar-simple-modal": typeof SimpleModal; - "astar-spinner": typeof Spinner; - "astar-text": typeof Text; - "astar-icon-back-with-color": typeof IconBackWithColor; + 'astar-button': typeof Button; + 'astar-irregular-button': typeof IrregularButton; + 'astar-radio-btn': typeof RadioBtn; + 'astar-small-button': typeof SmallButton; + 'astar-text-button': typeof TextButton; + 'astar-connection-indicator': typeof ConnectionIndicator; + 'astar-header': typeof Header; + 'astar-icon-3dots': typeof Icon3dots; + 'astar-icon-account-sample': typeof IconAccountSample; + 'astar-icon-arrow-left': typeof IconArrowLeft; + 'astar-icon-arrow-left-long': typeof IconArrowLeftLong; + 'astar-icon-arrow-right': typeof IconArrowRight; + 'astar-icon-arrow-right-long': typeof IconArrowRightLong; + 'astar-icon-assets': typeof IconAssets; + 'astar-icon-base': typeof IconBase; + 'astar-icon-bridge': typeof IconBridge; + 'astar-icon-circle-check': typeof IconCircleCheck; + 'astar-icon-close': typeof IconClose; + 'astar-icon-community': typeof IconCommunity; + 'astar-icon-copy': typeof IconCopy; + 'astar-icon-dapp-staking': typeof IconDappStaking; + 'astar-icon-dashboard': typeof IconDashboard; + 'astar-icon-desktop': typeof IconDesktop; + 'astar-icon-discord': typeof IconDiscord; + 'astar-icon-docs': typeof IconDocs; + 'astar-icon-document': typeof IconDocument; + 'astar-icon-ecosystem': typeof IconEcosystem; + 'astar-icon-expand': typeof IconExpand; + 'astar-icon-external-link': typeof IconExternalLink; + 'astar-icon-facebook': typeof IconFacebook; + 'astar-icon-forum': typeof IconForum; + 'astar-icon-github': typeof IconGithub; + 'astar-icon-group': typeof IconGroup; + 'astar-icon-geko': typeof IconHelp; + 'astar-icon-hide': typeof IconHide; + 'astar-icon-history': typeof IconHistory; + 'astar-icon-home': typeof IconHome; + 'astar-icon-instagram': typeof IconInstagram; + 'astar-icon-linkedin': typeof IconLinkedIn; + 'astar-icon-network': typeof IconNetwork; + 'astar-icon-outline-moon': typeof IconOutlineMoon; + 'astar-icon-outline-sun': typeof IconOutlineSun; + 'astar-icon-person': typeof IconPerson; + 'astar-icon-play': typeof IconPlay; + 'astar-icon-plus': typeof IconPlus; + 'astar-icon-reddit': typeof IconReddit; + 'astar-icon-search': typeof IconSearch; + 'astar-icon-side-nft': typeof IconSideNFT; + 'astar-icon-solid-selector': typeof IconSolidSelector; + 'astar-icon-star': typeof IconStar; + 'astar-icon-sync': typeof IconSync; + 'astar-icon-telegram': typeof IconTelegram; + 'astar-icon-transfer': typeof IconTransfer; + 'astar-icon-twitter': typeof IconTwitter; + 'astar-icon-unhide': typeof IconUnhide; + 'astar-icon-verified': typeof IconVerified; + 'astar-icon-vert': typeof IconVert; + 'astar-icon-wallet': typeof IconWallet; + 'astar-icon-youtube': typeof IconYoutube; + 'astar-default-modal': typeof DefaultModal; + 'astar-modal-drawer': typeof ModalDrawer; + 'astar-simple-modal': typeof SimpleModal; + 'astar-spinner': typeof Spinner; + 'astar-text': typeof Text; + 'astar-icon-back-with-color': typeof IconBackWithColor; } diff --git a/packages/index.ts b/packages/index.ts index 1e3e0b7..d5f82e8 100644 --- a/packages/index.ts +++ b/packages/index.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import { App, Plugin } from "vue"; +import { App, Plugin } from 'vue'; -import { TextPlugin } from "./Text"; -import { SpinnerPlugin } from "./Spinner"; -import { ModalsPlugin } from "./Modals"; -import { HeaderPlugin } from "./Header"; -import { ButtonsPlugin } from "./Buttons"; -import { IconsPlugin } from "./Icons"; +import { TextPlugin } from './Text'; +import { SpinnerPlugin } from './Spinner'; +import { ModalsPlugin } from './Modals'; +import { HeaderPlugin } from './Header'; +import { ButtonsPlugin } from './Buttons'; +import { IconsPlugin } from './Icons'; const AstarUIPlugin: Plugin = { install(app: App) { @@ -22,11 +22,11 @@ const AstarUIPlugin: Plugin = { export default AstarUIPlugin; -export * from "./Text"; -export * from "./Spinner"; -export * from "./Modals"; -export * from "./Header"; -export * from "./Buttons"; -export * from "./Icons"; +export * from './Text'; +export * from './Spinner'; +export * from './Modals'; +export * from './Header'; +export * from './Buttons'; +export * from './Icons'; -export * from "./export_type"; +export * from './export_type';