From 4de35f3b703db52f51463769e3aef4b23d2864e3 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Sat, 6 Aug 2022 04:39:26 +0000 Subject: [PATCH] [ci] format --- examples/basics/src/pages/index.astro | 4 +-- examples/blog/src/components/BaseHead.astro | 2 +- examples/blog/src/components/FollowMe.astro | 1 - examples/blog/src/pages/index.astro | 12 +++---- examples/component/demo/src/pages/index.astro | 2 +- .../packages/my-component/Button.astro | 2 +- .../packages/my-component/Heading.astro | 4 +-- .../src/components/Footer/AvatarList.astro | 10 +++--- .../docs/src/components/Footer/Footer.astro | 2 +- examples/docs/src/components/HeadCommon.astro | 12 +++---- examples/docs/src/components/HeadSEO.astro | 2 +- .../docs/src/components/Header/Header.astro | 16 +++++----- .../components/LeftSidebar/LeftSidebar.astro | 16 +++++----- .../components/PageContent/PageContent.astro | 6 ++-- .../components/RightSidebar/MoreMenu.astro | 4 +-- .../RightSidebar/RightSidebar.astro | 4 +-- examples/docs/src/layouts/MainLayout.astro | 20 ++++++------ .../framework-alpine/src/pages/index.astro | 4 +-- examples/framework-lit/src/pages/index.astro | 6 ++-- .../framework-multiple/src/pages/index.astro | 12 +++---- .../framework-preact/src/pages/index.astro | 2 +- .../framework-react/src/pages/index.astro | 2 +- .../framework-solid/src/pages/index.astro | 2 +- .../framework-svelte/src/pages/index.astro | 2 +- examples/framework-vue/src/pages/index.astro | 2 +- examples/non-html-pages/src/pages/index.astro | 2 +- .../portfolio/src/components/MainHead.astro | 6 ++-- examples/portfolio/src/layouts/project.astro | 10 +++--- examples/portfolio/src/pages/404.astro | 6 ++-- examples/portfolio/src/pages/about.astro | 6 ++-- examples/portfolio/src/pages/index.astro | 16 +++++----- examples/portfolio/src/pages/projects.astro | 10 +++--- examples/ssr/src/components/Container.astro | 2 +- examples/ssr/src/components/Header.astro | 10 +++--- .../ssr/src/components/ProductListing.astro | 2 +- .../src/components/TextDecorationSkip.astro | 2 +- examples/ssr/src/pages/cart.astro | 12 +++---- examples/ssr/src/pages/index.astro | 10 +++--- examples/ssr/src/pages/login.astro | 4 +-- examples/ssr/src/pages/products/[id].astro | 10 +++--- examples/subpath/src/pages/index.astro | 4 +-- .../src/layouts/main.astro | 4 +-- .../src/layouts/main.astro | 4 +-- examples/with-mdx/src/pages/index.mdx | 2 +- .../src/components/FigurineDescription.astro | 18 ++++++++--- .../with-nanostores/src/pages/index.astro | 3 +- .../src/components/Button.astro | 4 +-- .../with-tailwindcss/src/pages/index.astro | 2 +- packages/astro-prism/Prism.astro | 8 +++-- packages/astro/CHANGELOG.md | 26 +++++++++------- packages/astro/components/Code.astro | 10 ++++-- packages/astro/components/Debug.astro | 8 +++-- packages/integrations/cloudflare/CHANGELOG.md | 2 +- packages/integrations/deno/CHANGELOG.md | 2 +- .../integrations/image/components/Image.astro | 8 ++--- .../image/components/Picture.astro | 31 ++++++++++++------- packages/integrations/netlify/CHANGELOG.md | 2 +- packages/integrations/node/CHANGELOG.md | 2 +- packages/integrations/vercel/CHANGELOG.md | 2 +- 59 files changed, 216 insertions(+), 185 deletions(-) diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro index 1ca6b285c..486787536 100644 --- a/examples/basics/src/pages/index.astro +++ b/examples/basics/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Layout from "../layouts/Layout.astro"; -import Card from "../components/Card.astro"; +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; --- diff --git a/examples/blog/src/components/BaseHead.astro b/examples/blog/src/components/BaseHead.astro index cc6f89ff1..80de975b1 100644 --- a/examples/blog/src/components/BaseHead.astro +++ b/examples/blog/src/components/BaseHead.astro @@ -1,5 +1,5 @@ --- -import "../styles/blog.css"; +import '../styles/blog.css'; export interface Props { title: string; diff --git a/examples/blog/src/components/FollowMe.astro b/examples/blog/src/components/FollowMe.astro index 09062281a..093391147 100644 --- a/examples/blog/src/components/FollowMe.astro +++ b/examples/blog/src/components/FollowMe.astro @@ -8,4 +8,3 @@ const { username, href } = Astro.props as Props; ---

Follow me @{username}

- diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro index 22c095c74..727fc055f 100644 --- a/examples/blog/src/pages/index.astro +++ b/examples/blog/src/pages/index.astro @@ -1,13 +1,13 @@ --- -import BaseHead from "../components/BaseHead.astro"; -import Header from "../components/Header.astro"; -import BlogPostPreview from "../components/BlogPostPreview.astro"; +import BaseHead from '../components/BaseHead.astro'; +import Header from '../components/Header.astro'; +import BlogPostPreview from '../components/BlogPostPreview.astro'; -let title = "Example Blog"; -let description = "The perfect starter for your perfect blog."; +let title = 'Example Blog'; +let description = 'The perfect starter for your perfect blog.'; // Use Astro.glob to fetch all post with associated frontmatter -const unsortedPosts = await Astro.glob("./posts/*.md"); +const unsortedPosts = await Astro.glob('./posts/*.md'); const posts = unsortedPosts.sort(function (a, b) { return ( new Date(b.frontmatter.publishDate).valueOf() - new Date(a.frontmatter.publishDate).valueOf() diff --git a/examples/component/demo/src/pages/index.astro b/examples/component/demo/src/pages/index.astro index e251a69ae..bfdf495a8 100644 --- a/examples/component/demo/src/pages/index.astro +++ b/examples/component/demo/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import * as Component from "@example/my-component"; +import * as Component from '@example/my-component'; --- diff --git a/examples/component/packages/my-component/Button.astro b/examples/component/packages/my-component/Button.astro index 69b3b5eb5..5f32ce4e8 100644 --- a/examples/component/packages/my-component/Button.astro +++ b/examples/component/packages/my-component/Button.astro @@ -7,7 +7,7 @@ const { type, ...props } = { ...Astro.props, } as Props; -props.type = type || "button"; +props.type = type || 'button'; --- diff --git a/examples/component/packages/my-component/Heading.astro b/examples/component/packages/my-component/Heading.astro index 00f8926cc..813c0c11b 100644 --- a/examples/component/packages/my-component/Heading.astro +++ b/examples/component/packages/my-component/Heading.astro @@ -8,8 +8,8 @@ const { level, role, ...props } = { ...Astro.props, } as Props; -props.role = role || "heading"; -props["aria-level"] = level || "1"; +props.role = role || 'heading'; +props['aria-level'] = level || '1'; --- diff --git a/examples/docs/src/components/Footer/AvatarList.astro b/examples/docs/src/components/Footer/AvatarList.astro index 6f3ff1a7f..e5880a03a 100644 --- a/examples/docs/src/components/Footer/AvatarList.astro +++ b/examples/docs/src/components/Footer/AvatarList.astro @@ -1,6 +1,6 @@ --- // fetch all commits for just this page's path -const path = "docs/" + Astro.props.path; +const path = 'docs/' + Astro.props.path; const url = `https://api.github.com/repos/withastro/astro/commits?path=${path}`; const commitsURL = `https://github.com/withastro/astro/commits/main/${path}`; @@ -13,13 +13,13 @@ async function getCommits(url) { ); } - const auth = `Basic ${Buffer.from(token, "binary").toString("base64")}`; + const auth = `Basic ${Buffer.from(token, 'binary').toString('base64')}`; const res = await fetch(url, { - method: "GET", + method: 'GET', headers: { Authorization: auth, - "User-Agent": "astro-docs/1.0", + 'User-Agent': 'astro-docs/1.0', }, }); @@ -81,7 +81,7 @@ const additionalContributors = unique.length - recentContributors.length; // lis {additionalContributors > 0 && ( {`and ${additionalContributors} additional contributor${ - additionalContributors > 1 ? "s" : "" + additionalContributors > 1 ? 's' : '' }.`} )} diff --git a/examples/docs/src/components/Footer/Footer.astro b/examples/docs/src/components/Footer/Footer.astro index ab0634976..d13f832e5 100644 --- a/examples/docs/src/components/Footer/Footer.astro +++ b/examples/docs/src/components/Footer/Footer.astro @@ -1,5 +1,5 @@ --- -import AvatarList from "./AvatarList.astro"; +import AvatarList from './AvatarList.astro'; const { path } = Astro.props; --- diff --git a/examples/docs/src/components/HeadCommon.astro b/examples/docs/src/components/HeadCommon.astro index bc3a3955a..275aa315a 100644 --- a/examples/docs/src/components/HeadCommon.astro +++ b/examples/docs/src/components/HeadCommon.astro @@ -1,6 +1,6 @@ --- -import "../styles/theme.css"; -import "../styles/index.css"; +import '../styles/theme.css'; +import '../styles/index.css'; --- @@ -28,11 +28,11 @@ import "../styles/index.css"; diff --git a/examples/docs/src/components/HeadSEO.astro b/examples/docs/src/components/HeadSEO.astro index e3fa7b992..bd86b544d 100644 --- a/examples/docs/src/components/HeadSEO.astro +++ b/examples/docs/src/components/HeadSEO.astro @@ -1,5 +1,5 @@ --- -import { SITE, OPEN_GRAPH } from "../config"; +import { SITE, OPEN_GRAPH } from '../config'; export interface Props { content: any; site: any; diff --git a/examples/docs/src/components/Header/Header.astro b/examples/docs/src/components/Header/Header.astro index 650c93411..2e66300b4 100644 --- a/examples/docs/src/components/Header/Header.astro +++ b/examples/docs/src/components/Header/Header.astro @@ -1,11 +1,11 @@ --- -import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from "../../languages"; -import * as CONFIG from "../../config"; -import AstroLogo from "./AstroLogo.astro"; -import SkipToContent from "./SkipToContent.astro"; -import SidebarToggle from "./SidebarToggle"; -import LanguageSelect from "./LanguageSelect"; -import Search from "./Search"; +import { getLanguageFromURL, KNOWN_LANGUAGE_CODES } from '../../languages'; +import * as CONFIG from '../../config'; +import AstroLogo from './AstroLogo.astro'; +import SkipToContent from './SkipToContent.astro'; +import SidebarToggle from './SidebarToggle'; +import LanguageSelect from './LanguageSelect'; +import Search from './Search'; const { currentPage } = Astro.props; const lang = currentPage && getLanguageFromURL(currentPage); @@ -20,7 +20,7 @@ const lang = currentPage && getLanguageFromURL(currentPage);
diff --git a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro index f71610598..8b0c57f0a 100644 --- a/examples/docs/src/components/LeftSidebar/LeftSidebar.astro +++ b/examples/docs/src/components/LeftSidebar/LeftSidebar.astro @@ -1,6 +1,6 @@ --- -import { getLanguageFromURL } from "../../languages"; -import { SIDEBAR } from "../../config"; +import { getLanguageFromURL } from '../../languages'; +import { SIDEBAR } from '../../config'; const { currentPage } = Astro.props; const currentPageMatch = currentPage.slice(1); const langCode = getLanguageFromURL(currentPage); @@ -9,7 +9,7 @@ const sidebarSections = SIDEBAR[langCode].reduce((col, item, i) => { // If the first item is not a section header, create a new container section. if (i === 0) { if (!item.header) { - const pesudoSection = { text: "" }; + const pesudoSection = { text: '' }; col.push({ ...pesudoSection, children: [] }); } } @@ -33,7 +33,7 @@ const sidebarSections = SIDEBAR[langCode].reduce((col, item, i) => {