Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed Oct 2, 2024
1 parent ca95e54 commit 28ff4fa
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/analyze-source-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getTokens } from './get-tokens.js'
import type { createHighlighter } from './create-highlighter.js'
import type { ParseMetadataOptions } from './parse-source-text-metadata.js'
import { parseSourceTextMetadata } from './parse-source-text-metadata.js'
import type { Project } from "ts-morph";
import type { Project } from 'ts-morph'

export type AnalyzeSourceTextOptions = ParseMetadataOptions & {
project: Project
Expand Down
7 changes: 4 additions & 3 deletions packages/renoun/src/utils/extract-export-by-identifier.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { SourceFile } from "ts-morph";
import tsMorph from "ts-morph";
const { Node, ts } = tsMorph;
import type { SourceFile } from 'ts-morph'
import tsMorph from 'ts-morph'

const { Node, ts } = tsMorph

/** Extract a single export and its local dependencies from a source file. */
export function extractExportByIdentifier(
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/get-declaration-location.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Node, Project } from "ts-morph";
import type { Node, Project } from 'ts-morph'

/** The start and and position of the declaration in the file. */
export type DeclarationPosition = {
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/get-diagnostic-message.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DiagnosticMessageChain } from "ts-morph";
import type { DiagnosticMessageChain } from 'ts-morph'

/** Parses a diagnostic message into a string. */
export function getDiagnosticMessageText(
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/get-directory-source-file.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Directory, SourceFile } from "ts-morph";
import type { Directory, SourceFile } from 'ts-morph'

const indexFileNames = [
'js',
Expand Down
1 change: 1 addition & 0 deletions packages/renoun/src/utils/get-exported-declaration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ExportedDeclarations } from 'ts-morph'
import tsMorph from 'ts-morph'

const { Node } = tsMorph

/** Unwraps exported declarations from a source file. */
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/get-source-files-path-map.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { filePathToPathname } from '../utils/file-path-to-pathname.js'
import type { Directory } from "ts-morph";
import type { Directory } from 'ts-morph'

/** Returns a map of source file paths to their pathname. */
export function getSourcePathMap(
Expand Down
7 changes: 4 additions & 3 deletions packages/renoun/src/utils/get-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import { generatedFilenames } from './parse-source-text-metadata.js'
import type { Highlighter } from './create-highlighter.js'
import { getTrimmedSourceFileText } from './get-trimmed-source-file-text.js'
import { splitTokenByRanges } from './split-tokens-by-ranges.js'
import type { Diagnostic, Project, SourceFile, ts } from "ts-morph";
import tsMorph from "ts-morph";
const { Node, SyntaxKind } = tsMorph;
import type { Diagnostic, Project, SourceFile, ts } from 'ts-morph'
import tsMorph from 'ts-morph'

const { Node, SyntaxKind } = tsMorph

export const languageMap = {
mjs: 'js',
Expand Down
2 changes: 1 addition & 1 deletion packages/renoun/src/utils/get-trimmed-source-file-text.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SourceFile } from "ts-morph";
import type { SourceFile } from 'ts-morph'

/** Trims empty export statements added when coercing source text into module. */
export function getTrimmedSourceFileText(sourceFile: SourceFile) {
Expand Down
11 changes: 8 additions & 3 deletions packages/renoun/src/utils/resolve-expressions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { ArrayLiteralExpression, Expression, ObjectLiteralExpression } from "ts-morph";
import tsMorph from "ts-morph";
const { Node } = tsMorph;
import type {
ArrayLiteralExpression,
Expression,
ObjectLiteralExpression,
} from 'ts-morph'
import tsMorph from 'ts-morph'

const { Node } = tsMorph

export type LiteralExpressionValue =
| undefined
Expand Down
1 change: 1 addition & 0 deletions packages/renoun/src/utils/resolve-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {
Node,
} from 'ts-morph'
import tsMorph from 'ts-morph'

const { SyntaxKind, TypeFormatFlags } = tsMorph

export interface BaseType {
Expand Down

0 comments on commit 28ff4fa

Please sign in to comment.