Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed May 14, 2024
1 parent c351b77 commit 6067ee6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions packages/graphql-tag-pluck/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function customBlockFromVue(
vueTemplateCompiler: typeof import('@vue/compiler-sfc'),
fileData: string,
filePath: string,
blockType: string
blockType: string,
): Source | undefined {
const { descriptor } = vueTemplateCompiler.parse(fileData);

Expand Down Expand Up @@ -226,7 +226,9 @@ export const gqlPluckFromCodeString = async (
code = await pluckAstroFileScript(code);
}

const sources = parseCode({ code, filePath, options }).map(t => new Source(t.content, filePath, t.loc.start));
const sources = parseCode({ code, filePath, options }).map(
t => new Source(t.content, filePath, t.loc.start),
);
if (blockSource) {
sources.push(blockSource);
}
Expand Down Expand Up @@ -263,7 +265,9 @@ export const gqlPluckFromCodeStringSync = (
code = pluckAstroFileScriptSync(code);
}

const sources = parseCode({ code, filePath, options }).map(t => new Source(t.content, filePath, t.loc.start));
const sources = parseCode({ code, filePath, options }).map(
t => new Source(t.content, filePath, t.loc.start),
);
if (blockSource) {
sources.push(blockSource);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-tag-pluck/tests/graphql-tag-pluck.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ describe('graphql-tag-pluck', () => {
`),
{
gqlVueBlock: 'graphql',
}
},
);

expect(sources.map(source => source.body).join('\n\n')).toEqual(
Expand All @@ -2062,7 +2062,7 @@ describe('graphql-tag-pluck', () => {
}
}
}
`)
`),
);
});

Expand Down

0 comments on commit 6067ee6

Please sign in to comment.