Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Nov 30, 2023
1 parent fbf145a commit cfa0c45
Show file tree
Hide file tree
Showing 29 changed files with 19 additions and 38 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/@types/astro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type { AstroTimer } from '../core/config/timer.js';
import type { TSConfig } from '../core/config/tsconfig.js';
import type { AstroCookies } from '../core/cookies/index.js';
import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger/core.js';
import type { AstroPreferences } from '../preferences/index.js';
import type { AstroDevOverlay, DevOverlayCanvas } from '../runtime/client/dev-overlay/overlay.js';
import type { Icon } from '../runtime/client/dev-overlay/ui-library/icons.js';
import type {
Expand All @@ -35,7 +36,6 @@ import type {
import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
import type { DeepPartial, OmitIndexSignature, Simplify } from '../type-utils.js';
import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
import type { AstroPreferences } from '../preferences/index.js';

export { type AstroIntegrationLogger };

Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/assets/vite-plugin-assets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import MagicString from 'magic-string';
import type * as vite from 'vite';
import { normalizePath } from 'vite';
import type { AstroPluginOptions, ImageTransform } from '../@types/astro.js';
import { extendManualChunks } from '../core/build/plugins/util.js';
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/src/cli/preferences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import type { AstroSettings } from '../../@types/astro.js';
import { bold } from 'kleur/colors';
import { fileURLToPath } from 'node:url';

import * as msg from '../../core/messages.js';
import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js';
import dlv from 'dlv';
import { resolveConfig } from '../../core/config/config.js';
import { createSettings } from '../../core/config/settings.js';
import { coerce, isValidKey, type PreferenceKey } from '../../preferences/index.js';
import * as msg from '../../core/messages.js';
import { DEFAULT_PREFERENCES } from '../../preferences/defaults.js';
import dlv from 'dlv';
import { coerce, isValidKey, type PreferenceKey } from '../../preferences/index.js';
import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js';
// @ts-expect-error flattie types are mispackaged
import { flattie } from 'flattie';
import { formatWithOptions } from 'node:util';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/app/node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { RouteData } from '../../@types/astro.js';
import type { SerializedSSRManifest, SSRManifest } from './types.js';
import type { RenderOptions } from './index.js';
import type { SerializedSSRManifest, SSRManifest } from './types.js';

import * as fs from 'node:fs';
import { IncomingMessage } from 'node:http';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/core/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { blue, bold, green } from 'kleur/colors';
import fs from 'node:fs';
import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import type * as vite from 'vite';
import type {
AstroConfig,
AstroInlineConfig,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
import { getContentPaths } from '../../content/index.js';
import createPreferences from '../../preferences/index.js';
import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js';
import { getDefaultClientDirectives } from '../client-directive/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { formatYAMLException, isYAMLException } from '../errors/utils.js';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../constants.js';
import { AstroTimer } from './timer.js';
import { loadTSConfig } from './tsconfig.js';
import createPreferences from '../../preferences/index.js';

export function createBaseSettings(config: AstroConfig): AstroSettings {
const { contentDir } = getContentPaths(config);
Expand Down
3 changes: 1 addition & 2 deletions packages/astro/src/core/dev/dev.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { green } from 'kleur/colors';
import fs from 'node:fs';
import type http from 'node:http';
import type { AddressInfo } from 'node:net';
import { performance } from 'perf_hooks';
import type * as vite from 'vite';
import type { AstroInlineConfig } from '../../@types/astro.js';
import { attachContentServerListeners } from '../../content/index.js';
import { telemetry } from '../../events/index.js';
import * as msg from '../messages.js';
import { startContainer } from './container.js';
import { createContainerWithAutomaticRestart } from './restart.js';
import { green } from 'kleur/colors';

export interface DevServer {
address: AddressInfo;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/messages.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
bgCyan,
bgGreen,
bgRed,
bgWhite,
bgYellow,
bgCyan,
black,
blue,
bold,
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/core/module-loader/vite.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { EventEmitter } from 'node:events';
import path from 'node:path';
import type * as vite from 'vite';
import type { ModuleLoader, ModuleLoaderEventEmitter } from './loader.js';

export function createViteLoader(viteServer: vite.ViteDevServer): ModuleLoader {
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/i18n/vite-plugin-i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';

const virtualModuleId = 'astro:i18n';
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/integrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bold, cyan, underline } from 'kleur/colors';
import { bold } from 'kleur/colors';
import fs from 'node:fs';
import type { AddressInfo } from 'node:net';
import { fileURLToPath } from 'node:url';
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/preferences/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { AstroConfig } from '../@types/astro.js';

import { fileURLToPath } from 'node:url';
import os from 'node:os';
import process from 'node:process';
import path from 'node:path';
import process from 'node:process';
import { fileURLToPath } from 'node:url';

import dget from 'dlv';
import { DEFAULT_PREFERENCES, type Preferences } from './defaults.js';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/prefetch/vite-plugin-prefetch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';

const virtualModuleId = 'astro:prefetch';
Expand Down
4 changes: 1 addition & 3 deletions packages/astro/src/runtime/client/dev-overlay/overlay.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable no-console */
import type {
DevOverlayPlugin as DevOverlayPluginDefinition,
} from '../../../@types/astro.js';
import type { DevOverlayPlugin as DevOverlayPluginDefinition } from '../../../@types/astro.js';
import { settings } from './settings.js';
import { getIconElement, isDefinedIcon, type Icon } from './ui-library/icons.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export { DevOverlayBadge } from './badge.js';
export { DevOverlayButton } from './button.js';
export { DevOverlayCard } from './card.js';
export { DevOverlayHighlight } from './highlight.js';
export { DevOverlayIcon } from './icon.js';
export { DevOverlayToggle } from './toggle.js';
export { DevOverlayTooltip } from './tooltip.js';
export { DevOverlayWindow } from './window.js';
export { DevOverlayToggle } from './toggle.js';
export { DevOverlayIcon } from './icon.js';
1 change: 0 additions & 1 deletion packages/astro/src/transitions/vite-plugin-transitions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';

const virtualModuleId = 'astro:transitions';
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/type-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[]
? DeepPartial<U>[]
: T[P] extends object | undefined
? DeepPartial<T[P]>
: T[P];
? DeepPartial<T[P]>
: T[P];
};
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-astro-server/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';

import { bold } from 'kleur/colors';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-astro-server/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type fs from 'node:fs';
import type * as vite from 'vite';
import type { AstroSettings, ManifestData, SSRManifest } from '../@types/astro.js';
import type { SSRManifestI18n } from '../core/app/types.js';
import { patchOverlay } from '../core/errors/overlay.js';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-astro/hmr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { slash } from '@astrojs/internal-helpers/path';
import { fileURLToPath } from 'node:url';
import type { HmrContext, ModuleNode } from 'vite';
import type { AstroConfig } from '../@types/astro.js';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-astro/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { SourceDescription } from 'rollup';
import type * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
import type { PluginMetadata as AstroPluginMetadata } from './types.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type * as vite from 'vite';
import type { AstroPluginOptions } from '../@types/astro.js';

const VIRTUAL_MODULE_ID = 'astro:dev-overlay';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-env/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import MagicString from 'magic-string';
import { fileURLToPath } from 'node:url';
import type * as vite from 'vite';
import { loadEnv } from 'vite';
import type { AstroConfig, AstroSettings } from '../@types/astro.js';

Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-head/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ModuleInfo } from 'rollup';
import type * as vite from 'vite';
import type { SSRComponentMetadata, SSRResult } from '../@types/astro.js';
import type { AstroBuildPlugin } from '../core/build/plugin.js';
import type { PluginMetadata } from '../vite-plugin-astro/types.js';
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/vite-plugin-load-fallback/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import nodeFs from 'node:fs';
import npath from 'node:path';
import type * as vite from 'vite';
import { slash } from '../core/path.js';
import { cleanUrl } from '../vite-plugin-utils/index.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/markdoc/src/content-entry-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import matter from 'gray-matter';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { ErrorPayload as ViteErrorPayload, Rollup } from 'vite';
import type { Rollup, ErrorPayload as ViteErrorPayload } from 'vite';
import type { ComponentConfig } from './config.js';
import { htmlTokenTransform } from './html/transform/html-token-transform.js';
import type { MarkdocConfigResult } from './load-config.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/mdx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { markdownConfigDefaults, setVfileFrontmatter } from '@astrojs/markdown-r
import type { AstroIntegration, ContentEntryType, HookParameters, SSRError } from 'astro';
import astroJSXRenderer from 'astro/jsx/renderer.js';
import { parse as parseESM } from 'es-module-lexer';
import type { PluggableList } from 'unified';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
import type { PluggableList } from 'unified';
import { VFile } from 'vfile';
import type { Plugin as VitePlugin } from 'vite';
import { createMdxProcessor } from './plugins.js';
Expand Down
1 change: 0 additions & 1 deletion packages/integrations/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import react, { type Options as ViteReactPluginOptions } from '@vitejs/plugin-react';
import type { AstroIntegration } from 'astro';
import { version as ReactVersion } from 'react-dom';
import type * as vite from 'vite';

export type ReactIntegrationOptions = Pick<ViteReactPluginOptions, 'include' | 'exclude'> & {
experimentalReactChildren?: boolean;
Expand Down
1 change: 0 additions & 1 deletion packages/integrations/tailwind/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { AstroIntegration } from 'astro';
import autoprefixerPlugin from 'autoprefixer';
import type { ResultPlugin } from 'postcss-load-config';
import tailwindPlugin from 'tailwindcss';
import type { CSSOptions, UserConfig } from 'vite';

Expand Down

0 comments on commit cfa0c45

Please sign in to comment.