Skip to content

Commit

Permalink
feat: swtich to biome
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Jul 2, 2024
1 parent c0744fd commit 8101bef
Show file tree
Hide file tree
Showing 58 changed files with 1,093 additions and 2,248 deletions.
111 changes: 0 additions & 111 deletions .eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

34 changes: 0 additions & 34 deletions .prettierrc

This file was deleted.

30 changes: 29 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
{
"editor.defaultFormatter": "biomejs.biome",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"json.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "never"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[markdown]": {
"editor.formatOnSave": false
}
}
13 changes: 0 additions & 13 deletions apps/issuer/.eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions apps/issuer/.lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
'*.{js,ts}': ['eslint --fix'],
'*.ts': () => 'tsc -p tsconfig.json --noEmit --incremental false',
'*.{md,json,yml,yaml}': ['prettier --write'],
};
2 changes: 0 additions & 2 deletions apps/issuer/.prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion apps/issuer/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SupportedCredential } from '@blockchain-lab-um/oidc-types';
import type { SupportedCredential } from '@blockchain-lab-um/oidc-types';

/**
* This file is used to store environment variables that are used in the app.
Expand Down
6 changes: 0 additions & 6 deletions apps/issuer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@
"build": "pnpm build-clean && pnpm nest build",
"build-clean": "rimraf dist",
"docker:build": "docker build . -t blockchain-lab-um/oid4vc-issuer",
"format": "pnpm prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "pnpm lint:eslint && pnpm lint:tsc && pnpm lint:prettier",
"lint:eslint": "eslint . --ext .js,.ts --fix",
"lint:fix": "eslint . --fix && prettier . --write",
"lint:prettier": "prettier . --write",
"lint:tsc": "tsc --noEmit --incremental false",
"start": "pnpm nest start",
"start:debug": "pnpm nest start --debug --watch",
"start:dev": "pnpm nest start --watch",
Expand Down
10 changes: 5 additions & 5 deletions apps/issuer/src/app.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import type { FastifyReply } from 'fastify';
import qs from 'qs';

import { AppService } from './app.service.js';
import type { AppService } from './app.service.js';

@Controller()
export class AppController {
Expand All @@ -37,7 +37,7 @@ export class AppController {
@Get('/authorize')
@HttpCode(302)
async authorize(
@Response({ passthrough: true }) res: FastifyReply
@Response({ passthrough: true }) res: FastifyReply,
): Promise<void> {
// Redirect
return res.redirect(302, 'https://example.com/redirect');
Expand All @@ -50,7 +50,7 @@ export class AppController {
qs.parse(query as string, {
depth: 50,
parameterLimit: 1000,
}) as unknown as CredentialOfferRequest
}) as unknown as CredentialOfferRequest,
);
}

Expand All @@ -61,7 +61,7 @@ export class AppController {
@Header('Cache-Control', 'no-store')
async token(
@Headers('content-type') contentType: string,
@Body() body: TokenRequest
@Body() body: TokenRequest,
): Promise<TokenResponse> {
// Validate request header content-type
if (
Expand All @@ -77,7 +77,7 @@ export class AppController {
@HttpCode(200)
async credential(
@Headers('Authorization') authorization: string,
@Body() body: CredentialRequest
@Body() body: CredentialRequest,
): Promise<CredentialResponse> {
return this.appService.handleCredentialRequest(body, authorization);
}
Expand Down
Loading

0 comments on commit 8101bef

Please sign in to comment.