Skip to content

Commit

Permalink
Move eslint fix to codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Mar 15, 2024
1 parent 8aa3b50 commit 37084ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test-recursive": "bunx turbo run test --continue",
"lint": "bunx turbo run lint --continue -- --quiet",
"typecheck": "bunx turbo run typecheck --continue",
"graphql-codegen": "bunx turbo run graphql-codegen && bunx turbo run lint --continue -- --quiet --fix",
"graphql-codegen": "bunx turbo run graphql-codegen",
"align-dependencies": "bunx check-dependency-version-consistency --fix",
"build": "bunx turbo run build",
"prepare": "husky install",
Expand Down
25 changes: 15 additions & 10 deletions packages/graphql/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,21 @@ export function createServerConfig<TOutputPath extends string = typeof defaultSe
],
},
} : {
[output]: defineConfig({
resolverRelativeTargetDir: '.',
typeDefsFilePath: false,
mode: 'merged',
typesPluginsConfig: defaultConfig,
resolverTypesPath: resolversTypeFilename,
...resolverGeneration === true ? {} : resolverGeneration,
}, {
// baseOutputDir: '.',
}),
[output]: {
...defineConfig({
resolverRelativeTargetDir: '.',
typeDefsFilePath: false,
mode: 'merged',
typesPluginsConfig: defaultConfig,
resolverTypesPath: resolversTypeFilename,
...resolverGeneration === true ? {} : resolverGeneration,
}, {

}),
hooks: {
afterOneFileWrite: ['eslint --fix'],
},
},
}),
},
} satisfies CodegenConfig
Expand Down

0 comments on commit 37084ba

Please sign in to comment.