Skip to content

Commit

Permalink
run yarn prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
zhammer committed Dec 12, 2023
1 parent 646cd71 commit 530b43c
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 52 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn tsc
- run: yarn lint
- run: yarn prettier:check
- run: yarn test
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn tsc
- run: yarn lint
- run: yarn prettier:check
- run: yarn test
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ This project follow's SeatGeek's [Open Source Community Guidelines](CODE_OF_COND

## Contribution process

All submissions, including submissions by project members, require review. We use [GitHub pull
All submissions, including submissions by project members, require review. We use [GitHub pull
requests](https://docs.github.com/articles/about-pull-requests) for this purpose.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ their respective locations.

## Preview the collection

We have created a demo Backstage application to preview the SeatGeek Backstage Plugins Collection. To view it, clone this repository and run `yarn install && yarn dev`.
We have created a demo Backstage application to preview the SeatGeek Backstage Plugins Collection. To view it, clone this repository and run `yarn install && yarn dev`.
2 changes: 1 addition & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ catalog:
- type: file
target: ../../mock-catalog/templates/create-postgres-database.yaml
- type: file
target: ../../mock-catalog/templates/create-python-module.yaml
target: ../../mock-catalog/templates/create-python-module.yaml
2 changes: 1 addition & 1 deletion mock-catalog/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ metadata:
spec:
type: service
owner: product
lifecycle: production
lifecycle: production
2 changes: 1 addition & 1 deletion mock-catalog/organization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ metadata:
name: guests
spec:
type: team
children: []
children: []
4 changes: 1 addition & 3 deletions packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import {
AwardsPage
} from '@internal/plugin-awards';
import { AwardsPage } from '@internal/plugin-awards';

const app = createApp({
apis,
Expand Down
8 changes: 2 additions & 6 deletions packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ import {
} from '@backstage/plugin-org';
import { EntityTechdocsContent } from '@backstage/plugin-techdocs';
import { EmptyState } from '@backstage/core-components';
import {
EntityCatalogGraphCard,
} from '@backstage/plugin-catalog-graph';
import {
stringifyEntityRef,
} from '@backstage/catalog-model';
import { EntityCatalogGraphCard } from '@backstage/plugin-catalog-graph';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { UserAwardsCard } from '@internal/plugin-awards';
import { EntityScaffolderContent } from '@internal/plugin-entity-scaffolder-content';

Expand Down
6 changes: 4 additions & 2 deletions plugins/awards-backend/src/database/awards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ describe('awards database CRUD', () => {
[],
award.recipients,
);
}
await expect(createWithNoOwner).rejects.toThrow('New award must have at least one owner')
};
await expect(createWithNoOwner).rejects.toThrow(
'New award must have at least one owner',
);
});

it('should create an award with no recipients', async () => {
Expand Down
2 changes: 1 addition & 1 deletion plugins/awards-backend/src/database/awards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type DatabaseAwardsStoreOptions = {
};

export class DatabaseAwardsStore implements AwardsStore {
private constructor(private readonly db: Knex) { }
private constructor(private readonly db: Knex) {}

static async create({
database,
Expand Down
8 changes: 7 additions & 1 deletion plugins/awards-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ export async function createRouter(

const { name, description, image, owners, recipients } = request.body;

const resp = await dbStore.add(name, description, image, owners, recipients);
const resp = await dbStore.add(
name,
description,
image,
owners,
recipients,
);

response.json(resp);
});
Expand Down
4 changes: 2 additions & 2 deletions plugins/awards/src/api/AwardsBackendClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export class AwardsBackendApi implements AwardsApi {
query.append('name', name);
owners.forEach(owner => {
query.append('owners', owner);
})
});
recipients.forEach(recipient => {
query.append('recipients', recipient);
})
});
return await this.fetchApi
.fetch(`${url}?${query}`, {
method: 'GET',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ export const AwardEditCard = ({ award = emptyAward }: AwardEditCardProps) => {
const users: User[] = entities.items.map(entity => {
return {
name: entity.metadata.name,
ref: `${entity.kind.toLowerCase()}:${entity.metadata.namespace}/${entity.metadata.name
}`,
ref: `${entity.kind.toLowerCase()}:${entity.metadata.namespace}/${
entity.metadata.name
}`,
};
});
setAllUsers(users);
Expand Down Expand Up @@ -138,7 +139,7 @@ export const AwardEditCard = ({ award = emptyAward }: AwardEditCardProps) => {
severity: 'success',
display: 'transient',
});
navigate(`/awards/view/${res.uid}`,)
navigate(`/awards/view/${res.uid}`);
} else {
throw new Error('Error saving award');
}
Expand All @@ -162,7 +163,7 @@ export const AwardEditCard = ({ award = emptyAward }: AwardEditCardProps) => {
display: 'transient',
});

navigate('/awards')
navigate('/awards');
} else {
throw new Error('Error removing award');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const AwardViewComponent = ({ uid }: AwardViewComponentProps) => {
return res[0];
}
throw new Error(`Award with uid ${uid} does not exist`);

}, [awardsApi]);

if (loading) {
Expand All @@ -55,5 +54,4 @@ export const AwardViewComponent = ({ uid }: AwardViewComponentProps) => {
return <AwardViewCard award={value} />;
}
return <ResponseErrorPanel error={new Error('Unknown problem')} />;

};
5 changes: 1 addition & 4 deletions plugins/awards/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export {
awardsPlugin,
AwardsPage
} from './plugin';
export { awardsPlugin, AwardsPage } from './plugin';
export { UserAwardsCard } from './components';
export * from './api';
2 changes: 1 addition & 1 deletion plugins/awards/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ export const AwardsPage = awardsPlugin.provide(
component: () => import('./router').then(m => m.AwardsRouter),
mountPoint: rootRouteRef,
}),
);
);
2 changes: 1 addition & 1 deletion plugins/awards/src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const editRouteRef = createSubRouteRef({
id: 'awards-edit',
parent: rootRouteRef,
path: '/edit/:uid',
})
});

export const newRouteRef = createSubRouteRef({
id: 'awards-new',
Expand Down

0 comments on commit 530b43c

Please sign in to comment.