Skip to content

Commit

Permalink
fix: adming-generator - project-service error when formatting not exi…
Browse files Browse the repository at this point in the history
…sting file
  • Loading branch information
manuelblum committed Mar 3, 2025
1 parent b19a172 commit 409b0dd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export async function writeGenerated(filePath: string, contents: string): Promis
filePath,
});

// Write not linted generated code into file. This is necessary to avoid linting errors like: Parsing error: file/path/file.tsx was not found by the project service.
await fs.writeFile(filePath, contents);

if (lintResult[0].errorCount > 0 || lintResult[0].fatalErrorCount > 0) {
const errorMessage = lintResult[0].messages
.map((message) => {
Expand Down

0 comments on commit 409b0dd

Please sign in to comment.