Skip to content

Commit

Permalink
CI: adding prettier to pre-commit (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
itayB authored Jan 28, 2024
1 parent 60a16fa commit a405350
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 44 deletions.
7 changes: 7 additions & 0 deletions backend/.pre-commit-config.yaml → .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ repos:
rev: v0.0.286
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types_or: [html, css, javascript, ts, tsx]
additional_dependencies:
- prettier

# We would like to have a mypy pre-commit hook, but due to the fact that
# pre-commit runs in it's own isolated environment, we would need to install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
<p>This page is to ensure we’re able to parse a table into a tsv</p>
<table data-table-width="760" data-layout="default" ac:local-id="3ad64d9f-01f1-4f78-876e-0fdf84e826a6">
<tbody>
<tr>
<th>
<p><strong>hello</strong></p>
</th>
<th>
<p><strong>there</strong></p>
</th>
<th>
<p><strong>general</strong></p>
</th>
</tr>
<tr>
<td>
<p>kenobi</p>
</td>
<td>
<p>a</p>
</td>
<td>
<p>b</p>
</td>
</tr>
<tr>
<td>
<p>c</p>
</td>
<td>
<p>d</p>
</td>
<td>
<p>e</p>
</td>
</tr>
</tbody>
<table
data-table-width="760"
data-layout="default"
ac:local-id="3ad64d9f-01f1-4f78-876e-0fdf84e826a6"
>
<tbody>
<tr>
<th>
<p><strong>hello</strong></p>
</th>
<th>
<p><strong>there</strong></p>
</th>
<th>
<p><strong>general</strong></p>
</th>
</tr>
<tr>
<td>
<p>kenobi</p>
</td>
<td>
<p>a</p>
</td>
<td>
<p>b</p>
</td>
</tr>
<tr>
<td>
<p>c</p>
</td>
<td>
<p>d</p>
</td>
<td>
<p>e</p>
</td>
</tr>
</tbody>
</table>
<p />
8 changes: 4 additions & 4 deletions web/src/app/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ export const Chat = ({
(persona) => persona.id === existingChatSessionPersonaId
)
: defaultSelectedPersonaId !== undefined
? availablePersonas.find(
(persona) => persona.id === defaultSelectedPersonaId
)
: undefined
? availablePersonas.find(
(persona) => persona.id === defaultSelectedPersonaId
)
: undefined
);
const livePersona = selectedPersona || availablePersonas[0];

Expand Down
4 changes: 2 additions & 2 deletions web/src/components/admin/connectors/table/ConnectorsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function StatusRow<ConnectorConfigType, ConnectorCredentialType>({

export interface ColumnSpecification<
ConnectorConfigType,
ConnectorCredentialType
ConnectorCredentialType,
> {
header: string;
key: string;
Expand All @@ -101,7 +101,7 @@ export interface ColumnSpecification<

export interface ConnectorsTableProps<
ConnectorConfigType,
ConnectorCredentialType
ConnectorCredentialType,
> {
connectorIndexingStatuses: ConnectorIndexingStatus<
ConnectorConfigType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SingleUseConnectorStatus = ({

export function SingleUseConnectorsTable<
ConnectorConfigType,
ConnectorCredentialType
ConnectorCredentialType,
>({
connectorIndexingStatuses,
liveCredential,
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export interface IndexAttemptSnapshot {

export interface ConnectorIndexingStatus<
ConnectorConfigType,
ConnectorCredentialType
ConnectorCredentialType,
> {
cc_pair_id: number;
name: string | null;
Expand Down

1 comment on commit a405350

@vercel
Copy link

@vercel vercel bot commented on a405350 Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.