Skip to content

Commit

Permalink
Biome goes crazy. (#94)
Browse files Browse the repository at this point in the history
Allow me to understate this PR:

This formatter is faster.
  • Loading branch information
anthonyshew authored Sep 26, 2023
1 parent 0fab4d3 commit 7ea2049
Show file tree
Hide file tree
Showing 29 changed files with 374 additions and 361 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

jobs:
prettier:
name: Prettier
format:
name: Formatter
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
Expand All @@ -26,8 +26,8 @@ jobs:
- name: Setup
uses: ./tooling/github-actions/setup

- name: Run Prettier
run: turbo format
- name: Run formatter
run: pnpm format

eslint:
name: ESLint
Expand Down
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome"]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"editor.defaultFormatter": "biomejs.biome",
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
},
Expand Down
9 changes: 0 additions & 9 deletions apps/maestros/.prettierignore

This file was deleted.

2 changes: 1 addition & 1 deletion apps/maestros/app/(maestros)/contentHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const sideBarItems = allDocuments
});

export const buildNavigationGroups = () => {
const buildMe: ((typeof sideBarItems)[number] & {
const buildMe: (typeof sideBarItems[number] & {
children: typeof sideBarItems;
})[] = [];
const items = sideBarItems;
Expand Down
110 changes: 54 additions & 56 deletions apps/maestros/app/(maestros)/monorepos/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,71 +19,69 @@ export async function GET(req: Request) {
const marginY = marginX + 40;

return new ImageResponse(
(
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'flex-start',
backgroundImage: 'url("https://shew.dev/images/maestros/og-bg.png")',
backgroundSize: '100% 100%',
backgroundPosition: 'center',
}}
>
<div
style={{
marginLeft: marginX,
marginRight: marginX,
marginTop: marginY,
display: 'flex',
fontSize: 100,
fontFamily: 'Inter',
color: 'white',
whiteSpace: 'pre-wrap',
}}
tw="text-8xl"
>
{title}
</div>
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'flex-start',
backgroundImage: 'url("https://shew.dev/images/maestros/og-bg.png")',
backgroundSize: '100% 100%',
backgroundPosition: 'center',
justifyContent: 'center',
alignItems: 'center',
marginLeft: marginX,
}}
>
<div
style={{
marginLeft: marginX,
marginRight: marginX,
marginTop: marginY,
display: 'flex',
fontSize: 100,
fontFamily: 'Inter',
color: 'white',
whiteSpace: 'pre-wrap',
}}
tw="text-8xl"
>
{title}
</div>
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
marginLeft: marginX,
}}
>
{subtitle ? (
<div
style={{ fontFamily: 'Inter' }}
tw="text-6xl text-slate-300 mt-8"
>
{subtitle}
</div>
) : null}
</div>
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'flex-start',
marginLeft: marginX,
}}
>
{title !== 'Monorepo Maestros' ? (
<div tw="text-yellow-400 text-6xl mt-60">Monorepo Maestros</div>
) : null}
<div tw="text-yellow-400 text-5xl mt-8">
The ultimate monorepo reference.
{subtitle ? (
<div
style={{ fontFamily: 'Inter' }}
tw="text-6xl text-slate-300 mt-8"
>
{subtitle}
</div>
) : null}
</div>
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'flex-start',
marginLeft: marginX,
}}
>
{title !== 'Monorepo Maestros' ? (
<div tw="text-yellow-400 text-6xl mt-60">Monorepo Maestros</div>
) : null}
<div tw="text-yellow-400 text-5xl mt-8">
The ultimate monorepo reference.
</div>
</div>
),
</div>,
{
width: 1920,
height: 1080,
Expand Down
96 changes: 47 additions & 49 deletions apps/maestros/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,71 +19,69 @@ export async function GET(req: Request) {
const titleIsMyName = title === 'Anthony Shew';

return new ImageResponse(
(
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundImage: 'url("https://shew.dev/images/og-bg.png")',
backgroundSize: '100% 100%',
backgroundPosition: 'center',
}}
>
<div
style={{
height: '100%',
width: '100%',
marginLeft: 190,
marginRight: 190,
marginBottom: 70,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
backgroundImage: 'url("https://shew.dev/images/og-bg.png")',
backgroundSize: '100% 100%',
backgroundPosition: 'center',
fontSize: 140,
color: 'white',
fontFamily: 'Inter Bold',
whiteSpace: 'pre-wrap',
}}
>
{title}
</div>
{subtitle ? (
<div
style={{
marginLeft: 190,
marginRight: 190,
marginBottom: 70,
marginBottom: 120,
display: 'flex',
fontSize: 140,
color: 'white',
fontFamily: 'Inter Bold',
fontSize: 50,
fontFamily: 'Inter',
whiteSpace: 'pre-wrap',
}}
tw="text-slate-300"
>
{title}
{subtitle}
</div>
{subtitle ? (
<div
style={{
marginLeft: 190,
marginRight: 190,
marginBottom: 120,
display: 'flex',
fontSize: 50,
fontFamily: 'Inter',
whiteSpace: 'pre-wrap',
}}
tw="text-slate-300"
>
{subtitle}
</div>
) : null}
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<img
height={250}
src="https://shew.dev/images/me.jpg"
tw="rounded-full mb-10"
width={250}
/>
<div style={{ fontFamily: 'Inter' }} tw="text-7xl text-white">
{titleIsMyName ? '' : 'Anthony Shew'}
</div>
<div tw="text-6xl text-slate-400 mt-8">{tagline}</div>
) : null}
<div
style={{
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
}}
>
<img
height={250}
src="https://shew.dev/images/me.jpg"
tw="rounded-full mb-10"
width={250}
/>
<div style={{ fontFamily: 'Inter' }} tw="text-7xl text-white">
{titleIsMyName ? '' : 'Anthony Shew'}
</div>
<div tw="text-6xl text-slate-400 mt-8">{tagline}</div>
</div>
),
</div>,
{
width: 1920,
height: 1080,
Expand Down
15 changes: 7 additions & 8 deletions apps/maestros/components/Flow/data/ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ export const rawCiNodes = [

export const ciNodes = rawCiNodes.map((node) => handleNode(ciNodeId, node));

const rawCiEdges: MinimumEdge<(typeof rawCiNodes)[number]['data']['label']>[] =
[
{ source: 'Remote Cache', target: 'Jenkins' },
{ source: 'Remote Cache', target: 'CircleCI' },
{ source: 'Remote Cache', target: 'Docker' },
{ source: 'Remote Cache', target: 'GitHub Actions' },
{ source: 'Remote Cache', target: 'Vercel' },
];
const rawCiEdges: MinimumEdge<typeof rawCiNodes[number]['data']['label']>[] = [
{ source: 'Remote Cache', target: 'Jenkins' },
{ source: 'Remote Cache', target: 'CircleCI' },
{ source: 'Remote Cache', target: 'Docker' },
{ source: 'Remote Cache', target: 'GitHub Actions' },
{ source: 'Remote Cache', target: 'Vercel' },
];

export const ciEdges = rawCiEdges.map((edge) => handleEdge(ciNodeId, edge));
2 changes: 1 addition & 1 deletion apps/maestros/components/Flow/data/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const compilationNodes = rawCompilationNodes.map((node) =>
);

const rawCompilationEdges: MinimumEdge<
(typeof rawCompilationNodes)[number]['data']['label']
typeof rawCompilationNodes[number]['data']['label']
>[] = [
{ source: 'Bundlers', target: 'tsc' },
{ source: 'Bundlers', target: 'tsup' },
Expand Down
2 changes: 1 addition & 1 deletion apps/maestros/components/Flow/data/conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const conformanceNodes = rawConformanceNodes.map((node) =>
);

const rawConformanceEdges: MinimumEdge<
(typeof rawConformanceNodes)[number]['data']['label']
typeof rawConformanceNodes[number]['data']['label']
>[] = [
{ source: 'Guardrails', target: 'TypeScript' },
{ source: 'Guardrails', target: 'Prettier' },
Expand Down
8 changes: 4 additions & 4 deletions apps/maestros/components/Flow/data/intergroupEdges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { type rawStructureNodes, structureParentNode } from './structure';
import { type MinimumEdge } from '#/components/Flow/utils';

type AllNodes =
| (typeof rawCiNodes)[number]['data']['label']
| (typeof rawCompilationNodes)[number]['data']['label']
| (typeof rawConformanceNodes)[number]['data']['label']
| (typeof rawStructureNodes)[number]['data']['label'];
| typeof rawCiNodes[number]['data']['label']
| typeof rawCompilationNodes[number]['data']['label']
| typeof rawConformanceNodes[number]['data']['label']
| typeof rawStructureNodes[number]['data']['label'];

type Groups = 'ci' | 'compilation' | 'conformance' | 'structure';

Expand Down
2 changes: 1 addition & 1 deletion apps/maestros/components/Flow/data/structure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const structureNodes = rawStructureNodes.map((node) =>
);

const rawStructureEdges: MinimumEdge<
(typeof rawStructureNodes)[number]['data']['label']
typeof rawStructureNodes[number]['data']['label']
>[] = [
{ source: 'Monorepo managers', target: 'Nx' },
{ source: 'Monorepo managers', target: 'Turborepo' },
Expand Down
2 changes: 0 additions & 2 deletions apps/maestros/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"scripts": {
"build": "next build",
"dev": "next dev",
"format": "prettier . --check --cache --cache-location='node_modules/.cache/prettiercache'",
"format:fix": "prettier . --write --cache --cache-location='node_modules/.cache/prettiercache' --log-level=warn",
"generate": "contentlayer build",
"lint": "eslint . --cache --cache-location 'node_modules/.cache/.eslintcache' --max-warnings 0",
"lint:fix": "eslint . --fix --cache --cache-location 'node_modules/.cache/.eslintcache' --max-warnings 0",
Expand Down
3 changes: 0 additions & 3 deletions apps/starter-nextjs/.prettierignore

This file was deleted.

Loading

1 comment on commit 7ea2049

@vercel
Copy link

@vercel vercel bot commented on 7ea2049 Sep 26, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

maestros – ./

shew.dev
maestros-team-shew.vercel.app
maestros-git-main-team-shew.vercel.app
www.shew.dev

Please sign in to comment.