-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from magne4000/biome
Replace eslint and prettier by biome
- Loading branch information
Showing
130 changed files
with
1,949 additions
and
3,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"files": { | ||
"ignore": ["dist/", "package.json"] | ||
}, | ||
"formatter": { | ||
"indentWidth": 2, | ||
"indentStyle": "space" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"lineWidth": 120 | ||
} | ||
}, | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git" | ||
}, | ||
"overrides": [ | ||
{ | ||
"include": ["**/*.test.ts"], | ||
"linter": { | ||
"rules": { | ||
"suspicious": { "noExplicitAny": "off" } | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import type { VercelRequest, VercelResponse } from '@vercel/node'; | ||
import type { VercelRequest, VercelResponse } from "@vercel/node"; | ||
|
||
export default async function handler( | ||
request: VercelRequest, | ||
response: VercelResponse, | ||
) { | ||
return response.send('Name: ' + request.query.name); | ||
export default async function handler(request: VercelRequest, response: VercelResponse) { | ||
return response.send(`Name: ${request.query.name}`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import type { VercelRequest, VercelResponse } from '@vercel/node'; | ||
import type { VercelRequest, VercelResponse } from "@vercel/node"; | ||
|
||
export const headers = { | ||
'X-VitePluginVercel-Test': 'test', | ||
"X-VitePluginVercel-Test": "test", | ||
}; | ||
|
||
export default async function handler( | ||
request: VercelRequest, | ||
response: VercelResponse, | ||
) { | ||
return response.send('OK'); | ||
export default async function handler(request: VercelRequest, response: VercelResponse) { | ||
return response.send("OK"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import type { VercelRequest, VercelResponse } from '@vercel/node'; | ||
import type { VercelRequest, VercelResponse } from "@vercel/node"; | ||
|
||
export default async function handler( | ||
request: VercelRequest, | ||
response: VercelResponse, | ||
) { | ||
return response.send('OK'); | ||
export default async function handler(request: VercelRequest, response: VercelResponse) { | ||
return response.send("OK"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { get } from '@vercel/edge-config'; | ||
import { get } from "@vercel/edge-config"; | ||
|
||
export const edge = true; | ||
|
||
export default async function handler() { | ||
await get('someKey'); | ||
await get("someKey"); | ||
|
||
return new Response('Edge Function: OK', { | ||
return new Response("Edge Function: OK", { | ||
status: 200, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,45 @@ | ||
import React from 'react'; | ||
import { ImageResponse } from '@vercel/og'; | ||
import { readFileSync } from "node:fs"; | ||
import { join } from "node:path"; | ||
import { Readable } from "node:stream"; | ||
import type { ReadableStream } from "node:stream/web"; | ||
import type { VercelRequest, VercelResponse } from "@vercel/node"; | ||
import { ImageResponse } from "@vercel/og"; | ||
import React from "react"; | ||
|
||
import type { VercelRequest, VercelResponse } from '@vercel/node'; | ||
import { Readable } from 'node:stream'; | ||
import type { ReadableStream } from 'node:stream/web'; | ||
const font = readFileSync(join(__dirname, "./Roboto-Regular.ttf")); | ||
|
||
import { readFileSync } from 'node:fs'; | ||
import { join } from 'node:path'; | ||
|
||
const font = readFileSync(join(__dirname, './Roboto-Regular.ttf')); | ||
|
||
export default async function handler( | ||
request: VercelRequest, | ||
response: VercelResponse, | ||
) { | ||
export default async function handler(request: VercelRequest, response: VercelResponse) { | ||
const resp = new ImageResponse( | ||
( | ||
<div | ||
style={{ | ||
fontFamily: 'Roboto', | ||
fontSize: 40, | ||
color: 'black', | ||
background: 'white', | ||
width: '100%', | ||
height: '100%', | ||
padding: '50px 200px', | ||
textAlign: 'center', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
👋 Hello | ||
</div> | ||
), | ||
<div | ||
style={{ | ||
fontFamily: "Roboto", | ||
fontSize: 40, | ||
color: "black", | ||
background: "white", | ||
width: "100%", | ||
height: "100%", | ||
padding: "50px 200px", | ||
textAlign: "center", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}} | ||
> | ||
👋 Hello | ||
</div>, | ||
{ | ||
width: 1200, | ||
height: 630, | ||
fonts: [ | ||
{ | ||
name: 'Roboto', | ||
name: "Roboto", | ||
// Use `fs` (Node.js only) or `fetch` to read the font as Buffer/ArrayBuffer and provide `data` here. | ||
data: font, | ||
weight: 400, | ||
style: 'normal', | ||
style: "normal", | ||
}, | ||
], | ||
}, | ||
); | ||
|
||
Readable.fromWeb(resp.body as ReadableStream<any>).pipe(response); | ||
Readable.fromWeb(resp.body as ReadableStream).pipe(response); | ||
} |
Oops, something went wrong.