Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Apr 17, 2024
1 parent 40e8450 commit 347bdfe
Show file tree
Hide file tree
Showing 133 changed files with 169 additions and 169 deletions.
2 changes: 1 addition & 1 deletion packages/astro/components/Image.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { getImage, type LocalImageProps, type RemoteImageProps } from 'astro:assets';
import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets';
import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
import type { HTMLAttributes } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/components/Picture.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { getImage, type LocalImageProps, type RemoteImageProps } from 'astro:assets';
import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets';
import type { GetImageResult, ImageOutputFormat } from '../dist/@types/astro';
import { isESMImportedImage, resolveSrc } from '../dist/assets/utils/imageKind';
import { AstroError, AstroErrorData } from '../dist/core/errors/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import Hero from '../components/Hero.astro';
import LinkedLib from '@e2e/astro-linked-lib'
import HoistedScript from '@e2e/astro-linked-lib/HoistedScript'
import Hero from '../components/Hero.astro';
---

<html>
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/e2e/fixtures/client-only/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import * as react from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.jsx';
import * as react from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.jsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import One from './One.jsx';
import Deeper from './Deeper.astro';
import One from './One.jsx';
---


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import ClientOnlyComponent from '../components/ClientOnlyComponent.js';
import MyCounter from '../components/Counter.js';
import NonDeferredCounter from '../components/NonDeferredCounter.js';
import ClientOnlyComponent from '../components/ClientOnlyComponent.js';
const someProps = {
count: 10,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
// Style Imports
import '../styles/global.css';
// Component Imports
import { A, B as Renamed } from '../components';
import * as react from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import * as react from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Style Imports
import '../styles/global.css';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import ReactCounter from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import ReactCounter from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import ReactCounter from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import ReactCounter from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import { PreactCounter } from '../components/preact/PreactCounter.tsx';
import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
// Full Astro Component Syntax:
// https://docs.astro.build/basics/astro-components/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import ReactCounter from '../components/react/ReactCounter.jsx';
import PreactCounter from '../components/preact/PreactCounter.tsx';
import ReactCounter from '../components/react/ReactCounter.jsx';
import SolidCounter from '../components/solid/SolidCounter.tsx';
import VueCounter from '../components/vue/VueCounter.vue';
import SvelteCounter from '../components/svelte/SvelteCounter.svelte';
import VueCounter from '../components/vue/VueCounter.vue';
---

<html lang="en">
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/pass-js/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import type { BigNestedObject } from '../types';
import Component from '../components/React';
import type { BigNestedObject } from '../types';
const object: BigNestedObject = {
nested: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import WrapperB from "../components/WrapperB.jsx";
import WrapperA from "../components/WrapperA.jsx";
import WrapperB from "../components/WrapperB.jsx";
---

<html>
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/e2e/fixtures/tailwindcss/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
// Component Imports
import Layout from '../components/Layout.astro';
import Button from '../components/Button.astro';
import Complex from '../components/Complex.astro';
// Component Imports
import Layout from '../components/Layout.astro';
---

<Layout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { navigate } from "astro:transitions/client";
import React from 'react';
export default function ClickToNavigate({ to, id }) {
return <button id={id} onClick={() => navigate(to)}>Navigate to `{to}`</button>;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import ClickToNavigate from "../components/ClickToNavigate.jsx"
import { ViewTransitions } from "astro:transitions";
import ClickToNavigate from "../components/ClickToNavigate.jsx"
---
<html>
<head>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island';
import VueCounter from '../components/VueCounter.vue';
import Layout from '../components/Layout.astro';
import SvelteCounter from '../components/SvelteCounter.svelte';
import VueCounter from '../components/VueCounter.vue';
---
<Layout>
<p id="page-four">Page 4</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island';
import Layout from '../components/Layout.astro';
---
<Layout>
<a id="click-two" href="/client-only-two">go to page 2</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island';
import VueCounter from '../components/VueCounter.vue';
import Layout from '../components/Layout.astro';
import SvelteCounter from '../components/SvelteCounter.svelte';
import VueCounter from '../components/VueCounter.vue';
---
<Layout>
<a id="click-four" href="/client-only-four">go to page 4</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island';
import Layout from '../components/Layout.astro';
---
<Layout>
<p id="page-two">Page 2</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import InlineScript from '../components/InlineScript.astro';
import Layout from '../components/Layout.astro';
---
<Layout>
<InlineScript />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import InlineScript from '../components/InlineScript.astro';
import Layout from '../components/Layout.astro';
---
<Layout>
<InlineScript />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island.jsx';
import Layout from '../components/Layout.astro';
export const prerender = false;
const persistProps = Astro.url.searchParams.has('persist');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Layout from '../components/Layout.astro';
import Island from '../components/Island.jsx';
import Layout from '../components/Layout.astro';
---
<Layout>
<p id="island-two">Page 2</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Counter from '../components/Counter.vue';
import VueComponent from '../components/VueComponent.vue';
import AsyncTest from '../components/Test.vue'
import State from '../components/State.vue'
import AsyncTest from '../components/Test.vue'
import VueComponent from '../components/VueComponent.vue';
const someProps = {
count: 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/e2e/nested-recursive.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test as base } from '@playwright/test';
import { test as base, expect } from '@playwright/test';
import { loadFixture, waitForHydrate } from './test-utils.js';

const test = base.extend({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { Heading, Aside, LikeButton, HydratedLikeButton } from '@performance/utils';
import type { CollectionEntry } from 'astro:content';
import { Aside, Heading, HydratedLikeButton, LikeButton } from '@performance/utils';
type Props = {
entry: CollectionEntry<'generated'>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Title from './Title.astro';
import type { CollectionEntry } from 'astro:content';
import Title from './Title.astro';
type Props = {
entry: CollectionEntry<'generated'>;
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/assets/endpoint/generic.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-expect-error
import { imageConfig } from 'astro:assets';
import { isRemotePath } from '@astrojs/internal-helpers/path';
import mime from 'mime/lite.js';
import type { APIRoute } from '../../@types/astro.js';
import { getConfiguredImageService } from '../internal.js';
import { etag } from '../utils/etag.js';
import { isRemoteAllowed } from '../utils/remotePattern.js';
// @ts-expect-error
import { imageConfig } from 'astro:assets';

async function loadRemoteImage(src: URL, headers: Headers) {
try {
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/assets/endpoint/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import os from 'node:os';
import { isAbsolute } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
// @ts-expect-error
import { assetsDir, imageConfig, outDir } from 'astro:assets';
import { isRemotePath, removeQueryString } from '@astrojs/internal-helpers/path';
import { readFile } from 'fs/promises';
import mime from 'mime/lite.js';
import type { APIRoute } from '../../@types/astro.js';
import { getConfiguredImageService } from '../internal.js';
import { etag } from '../utils/etag.js';
import { isRemoteAllowed } from '../utils/remotePattern.js';
// @ts-expect-error
import { assetsDir, imageConfig, outDir } from 'astro:assets';

function replaceFileSystemReferences(src: string) {
return os.platform().includes('win32') ? src.replace(/^\/@fs\//, '') : src.replace(/^\/@fs/, '');
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Plugin as VitePlugin, Rollup } from 'vite';
import type { Rollup, Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from './internal.js';
import type { StaticBuildOptions, ViteBuildReturn } from './types.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/plugins/plugin-css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GetModuleInfo } from 'rollup';
import type { BuildOptions, Plugin as VitePlugin, ResolvedConfig, Rollup } from 'vite';
import type { BuildOptions, ResolvedConfig, Rollup, Plugin as VitePlugin } from 'vite';
import { isBuildableCSSRequest } from '../../../vite-plugin-astro-server/util.js';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin, BuildTarget } from '../plugin.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/plugins/util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { extname } from 'node:path';
import type { BuildOptions, Plugin as VitePlugin, Rollup } from 'vite';
import type { BuildOptions, Rollup, Plugin as VitePlugin } from 'vite';

// eslint-disable-next-line @typescript-eslint/ban-types
type OutputOptionsHook = Extract<VitePlugin['outputOptions'], Function>;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/schema.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {
ShikiConfig,
RehypePlugin as _RehypePlugin,
RemarkPlugin as _RemarkPlugin,
RemarkRehype as _RemarkRehype,
ShikiConfig,
} from '@astrojs/markdown-remark';
import { markdownConfigDefaults } from '@astrojs/markdown-remark';
import { type BuiltinTheme, bundledThemes } from 'shiki';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/logger/vite.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'url';
import stripAnsi from 'strip-ansi';
import type { LogLevel, Logger as ViteLogger, Rollup } from 'vite';
import type { LogLevel, Rollup, Logger as ViteLogger } from 'vite';
import { isAstroError } from '../errors/errors.js';
import { serverShortcuts as formatServerShortcuts } from '../messages.js';
import { type Logger as AstroLogger, isLogLevelEnabled } from './core.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/runtime/client/dev-toolbar/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-expect-error
import { loadDevToolbarApps } from 'astro:dev-toolbar';
import type { DevToolbarApp as DevToolbarAppDefinition } from '../../../@types/astro.js';
import { settings } from './settings.js';
import type { AstroDevToolbar, DevToolbarApp } from './toolbar.js';
// @ts-expect-error
import { loadDevToolbarApps } from 'astro:dev-toolbar';

let overlay: AstroDevToolbar;

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-astro/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type * as vite from 'vite';
import type { AstroConfig, AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
import type {
CompileMetadata,
PluginCssMetadata as AstroPluginCssMetadata,
PluginMetadata as AstroPluginMetadata,
CompileMetadata,
} from './types.js';

import { normalizePath } from 'vite';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-config-alias/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path';
import type { CompilerOptions } from 'typescript';
import { type Plugin as VitePlugin, type ResolvedConfig, normalizePath } from 'vite';
import { type ResolvedConfig, type Plugin as VitePlugin, normalizePath } from 'vite';
import type { AstroSettings } from '../@types/astro.js';

type Alias = {
Expand Down
Loading

0 comments on commit 347bdfe

Please sign in to comment.