Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 9ebe729

Browse files
alloykastermester
authored andcommitted
[prettier] Run
1 parent bd3b028 commit 9ebe729

File tree

4 files changed

+21
-12
lines changed

4 files changed

+21
-12
lines changed

src/FindGraphQLTags.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ function visit(node: ts.Node, addGraphQLTag: (tag: GraphQLTag) => void): void {
130130
case ts.SyntaxKind.TaggedTemplateExpression: {
131131
const taggedTemplate = node as ts.TaggedTemplateExpression;
132132
if (isGraphQLTag(taggedTemplate.tag)) {
133-
// TODO: This code previously had no validation and thus no keyName/sourceLocationOffset. Are these right?
133+
// TODO: This code previously had no validation and thus no
134+
// keyName/sourceLocationOffset. Are these right?
134135
addGraphQLTag({
135136
keyName: null,
136137
template: getGraphQLText(taggedTemplate),

src/TypeScriptGenerator.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
Root
2525
} from "relay-compiler/lib/GraphQLCompilerPublic";
2626

27-
import { TypeGeneratorOptions } from 'relay-compiler'
27+
import { TypeGeneratorOptions } from "relay-compiler";
2828

2929
const { isAbstractType } = SchemaUtils;
3030

@@ -468,11 +468,16 @@ function groupRefs(props: Selection[]): Selection[] {
468468
function getFragmentImports(state: State) {
469469
const imports: ts.Statement[] = [];
470470
if (state.usedFragments.size > 0) {
471-
const ownDirectory = state.destinationDirectory && state.destinationDirectory.getPath("");
471+
const ownDirectory =
472+
state.destinationDirectory && state.destinationDirectory.getPath("");
472473
const usedFragments = Array.from(state.usedFragments).sort();
473474
for (const usedFragment of usedFragments) {
474475
const refTypeName = getRefTypeName(usedFragment);
475-
if (ownDirectory && state.getGeneratedDirectory && state.existingFragmentNames.has(usedFragment)) {
476+
if (
477+
ownDirectory &&
478+
state.getGeneratedDirectory &&
479+
state.existingFragmentNames.has(usedFragment)
480+
) {
476481
const importDir = state.getGeneratedDirectory(usedFragment).getPath("");
477482
const relative = path.relative(ownDirectory, importDir);
478483
const relativeReference = relative.length === 0 ? "./" : "";

src/TypeScriptTypeTransformers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
GraphQLUnionType
1414
} from "graphql";
1515

16-
import { TypeGeneratorOptions } from 'relay-compiler'
16+
import { TypeGeneratorOptions } from "relay-compiler";
1717

1818
export type ScalarTypeMapping = {
1919
[type: string]: string;

types/relay-compiler/language/RelayLanguagePluginInterface.d.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@ export type FormatModule = (
3333
}
3434
) => string;
3535

36-
export type GraphQLTagFinder = (text: string, filePath: string) => Array<GraphQLTag>;
36+
export type GraphQLTagFinder = (
37+
text: string,
38+
filePath: string
39+
) => Array<GraphQLTag>;
3740

3841
export interface TypeGeneratorOptions {
39-
readonly customScalars: { [type: string]: string },
40-
readonly useHaste: boolean,
41-
readonly enumsHasteModule: string | null,
42-
readonly existingFragmentNames: Set<string>,
43-
readonly inputFieldWhiteList: ReadonlyArray<string>,
44-
readonly relayRuntimeModule: string,
42+
readonly customScalars: { [type: string]: string };
43+
readonly useHaste: boolean;
44+
readonly enumsHasteModule: string | null;
45+
readonly existingFragmentNames: Set<string>;
46+
readonly inputFieldWhiteList: ReadonlyArray<string>;
47+
readonly relayRuntimeModule: string;
4548
}
4649

4750
export interface TypeGenerator {

0 commit comments

Comments
 (0)