Skip to content

Commit 5a90c6a

Browse files
committed
format
1 parent 18dffa2 commit 5a90c6a

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

examples/misc/express/valibot/express.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { pathMap } from "../../spec/valibot";
66
const emptyMiddleware = (
77
req: express.Request,
88
res: express.Response,
9-
next: express.NextFunction
9+
next: express.NextFunction,
1010
) => next();
1111
type Handlers = ToHandlers<typeof pathMap>;
1212
const newApp = () => {
@@ -56,7 +56,7 @@ const newApp = () => {
5656

5757
const getUserHandler: Handlers["/users/:userId"]["get"] = async (
5858
req,
59-
res
59+
res,
6060
) => {
6161
const r = await res.locals.validate(req).params();
6262
if (r.issues) {

examples/misc/express/zod/express.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { asAsync } from "@notainc/typed-api-spec/express";
66
const emptyMiddleware = (
77
req: express.Request,
88
res: express.Response,
9-
next: express.NextFunction
9+
next: express.NextFunction,
1010
) => next();
1111
type Handlers = ToHandlers<typeof pathMap>;
1212
const newApp = () => {
@@ -56,7 +56,7 @@ const newApp = () => {
5656

5757
const getUserHandler: Handlers["/users/:userId"]["get"] = async (
5858
req,
59-
res
59+
res,
6060
) => {
6161
const r = await res.locals.validate(req).params();
6262
if (r.issues) {

examples/misc/fastify/zod/fastify.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const _noExecution = () => {
5656
type Query = { page: string };
5757
const { page } = request.query as Query;
5858
return { userNames: [`page${page}#user1`] };
59-
}
59+
},
6060
);
6161
};
6262

examples/misc/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"scripts": {
3-
"format": "prettier --write ",
3+
"format": "prettier --write .",
44
"watch:type-check": "npx tsc --noEmit --watch",
55
"test": "run-p test:*",
6-
"test:lint": "eslint ",
7-
"test:format": "prettier --check ",
6+
"test:lint": "eslint .",
7+
"test:format": "prettier --check .",
88
"test:type-check": "tsc --noEmit",
99
"ex:express:zod:server": "tsx express/zod/express.ts",
1010
"ex:express:zod:client": "tsx express/zod/fetch.ts",

examples/misc/simple/withValidation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const main = async () => {
2929
const fetchWithV = withValidation(fetch, spec, reqValidator, resValidator);
3030
const response = await fetchWithV(
3131
`${GITHUB_API_ORIGIN}/repos/nota/typed-api-spec/topics?page=1`,
32-
{ headers: { Accept: "application/vnd.github+json" } }
32+
{ headers: { Accept: "application/vnd.github+json" } },
3333
);
3434
if (!response.ok) {
3535
const { message } = await response.json();
@@ -46,7 +46,7 @@ const main = async () => {
4646
try {
4747
await fetchWithV(
4848
`${GITHUB_API_ORIGIN}/repos/nota/typed-api-spec/topics?page=1`,
49-
{ headers: { Accept: "application/vnd.github+json" } }
49+
{ headers: { Accept: "application/vnd.github+json" } },
5050
);
5151
} catch (e) {
5252
if (e instanceof SpecValidatorError) {

examples/misc/tsconfig.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"exclude": [
3-
"../../pkgs/docs"
4-
],
2+
"exclude": ["../../pkgs/docs"],
53
"compilerOptions": {
64
/* Visit https://aka.ms/tsconfig to read more about this file */
75

0 commit comments

Comments
 (0)