Skip to content

Commit 7288286

Browse files
authored
Format checked, contributing.md update (#49)
Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
1 parent ec1cf3c commit 7288286

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ This project and everyone participating in it is governed by the [Open Archiver
5151
- Follow the existing code style.
5252
- Use TypeScript's strict mode.
5353
- Avoid using `any` as a type. Define clear interfaces and types in the `packages/types` directory.
54+
55+
### Formatting
56+
57+
We use Prettier for code formatting. Before you commit new code, it is necessary to check code format by running this command from the root folder:
58+
59+
`pnpm run lint`
60+
61+
If there are any format issues, you can use the following command to fix them
62+
63+
`pnpm run format`

packages/backend/src/api/controllers/ingestion.controller.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,10 @@ export class IngestionController {
3333
} catch (error: any) {
3434
logger.error({ err: error }, 'Create ingestion source error');
3535
// Return a 400 Bad Request for connection errors
36-
return res
37-
.status(400)
38-
.json({
39-
message:
40-
error.message ||
41-
'Failed to create ingestion source due to a connection error.',
42-
});
36+
return res.status(400).json({
37+
message:
38+
error.message || 'Failed to create ingestion source due to a connection error.',
39+
});
4340
}
4441
};
4542

0 commit comments

Comments
 (0)