[ci] format

This commit is contained in:
matthewp 2022-07-21 17:48:45 +00:00 committed by fredkbot
parent ddefb172f6
commit 81758f1c1e
7 changed files with 17 additions and 16 deletions

View file

@ -5,5 +5,5 @@ import preact from '@astrojs/preact';
export default defineConfig({
// Enable the Preact integration to support Preact JSX components.
integrations: [preact()],
site: `http://astro.build`
site: `http://astro.build`,
});

View file

@ -4,5 +4,5 @@ import preact from '@astrojs/preact';
// https://astro.build/config
export default defineConfig({
integrations: [preact()],
site: `http://astro.build`
site: `http://astro.build`,
});

View file

@ -10,5 +10,5 @@ export default defineConfig({
// Enable React for the Algolia search component.
react(),
],
site: `http://astro.build`
site: `http://astro.build`,
});

View file

@ -85,10 +85,10 @@ export interface BuildConfig {
* [Astro reference](https://docs.astro.build/reference/api-reference/#astro-global)
*/
export interface AstroGlobal extends AstroGlobalPartial {
/**
/**
* Canonical URL of the current page.
* @deprecated Use `Astro.url` instead.
*
*
* Example:
* ```astro
* ---
@ -102,9 +102,9 @@ export interface AstroGlobal extends AstroGlobalPartial {
*/
clientAddress: string;
/**
* A full URL object of the request URL.
* A full URL object of the request URL.
* Equivalent to: `new URL(Astro.request.url)`
*
*
* [Astro reference](https://docs.astro.build/en/reference/api-reference/#url)
*/
url: URL;

View file

@ -3,7 +3,6 @@ import { bold } from 'kleur/colors';
import type {
AstroGlobal,
AstroGlobalPartial,
Page,
Params,
Props,
RuntimeMode,
@ -215,12 +214,11 @@ ${extra}`
} as unknown as AstroGlobal;
Object.defineProperty(Astro, 'canonicalURL', {
get: function() {
warn(args.logging,
get: function () {
warn(
args.logging,
'deprecation',
`${bold(
'Astro.canonicalURL'
)} is deprecated! Use \`Astro.url\` instead.
`${bold('Astro.canonicalURL')} is deprecated! Use \`Astro.url\` instead.
Example:
---

View file

@ -1,4 +1,3 @@
import npath from 'path-browserify';
import type { ModuleNode, ViteDevServer } from 'vite';
import type { Metadata } from '../../runtime/server/metadata.js';

View file

@ -1,7 +1,7 @@
import type { AstroConfig } from '../@types/astro';
import * as path from 'path';
import * as tsr from 'tsconfig-resolver';
import * as url from 'url';
import type { AstroConfig } from '../@types/astro';
import type * as vite from 'vite';
@ -87,7 +87,11 @@ const getConfigAlias = (cwd: string | undefined): Alias[] | null => {
};
/** Returns a Vite plugin used to alias pathes from tsconfig.json and jsconfig.json. */
export default function configAliasVitePlugin({ config: astroConfig }: { config: AstroConfig }): vite.PluginOption {
export default function configAliasVitePlugin({
config: astroConfig,
}: {
config: AstroConfig;
}): vite.PluginOption {
/** Aliases from the tsconfig.json or jsconfig.json configuration. */
const configAlias = getConfigAlias(astroConfig.root && url.fileURLToPath(astroConfig.root));