Skip to content

Commit 0bd1f58

Browse files
committed
applied biome lint and format fixes
1 parent 43a6b97 commit 0bd1f58

28 files changed

Lines changed: 268 additions & 181 deletions

.dockerignore

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
**/*.DS_Store
22
**/*.env*
3-
**/*.git
4-
**/.*dev-container
5-
**/.github
3+
**/*.git*
64
**/.vscode
75
**/node_modules
8-
.editorconfig
9-
.gitattributes
10-
.gitignore
11-
.prettierignore
12-
.prettierrc.json
13-
eslint.config.js
6+
.dockerignore
7+
Dockerfile
148
fly.toml
15-
import-sorter.json
9+
lefthook.yml
1610
LICENSE
1711
README.md

.editorconfig

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/cicd.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ on:
77
branches: ["*"]
88

99
jobs:
10-
lint:
11-
name: install, lint
10+
cicd:
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/checkout@v3
15-
- uses: oven-sh/setup-bun@v1
14+
- uses: oven-sh/setup-bun@v2
1615
with:
1716
bun-version: latest
18-
19-
- run: bun i --ignore-scripts --frozen-lockfile
20-
- run: bun lint
17+
- run: bun install --ignore-scripts --frozen-lockfile
18+
- run: bun run biome ci .
19+
- run: bun run compile

.github/workflows/deploy.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,9 @@ env:
99

1010
jobs:
1111
deploy:
12-
name: fly.io deploy
13-
1412
runs-on: ubuntu-latest
15-
1613
environment: production
17-
1814
steps:
1915
- uses: actions/checkout@v3
20-
- uses: oven-sh/setup-bun@v1
21-
with:
22-
bun-version: latest
23-
24-
- run: bun i --ignore-scripts --frozen-lockfile
25-
- run: bun lint
26-
2716
- uses: superfly/flyctl-actions/setup-flyctl@master
2817
- run: flyctl deploy --remote-only --detach --no-cache --config fly.toml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.env
33
.DS_Store
4+
/main*

.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.prettierrc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
{
2-
"recommendations": [
3-
"ms-azuretools.vscode-docker",
4-
"dbaeumer.vscode-eslint",
5-
"editorconfig.editorconfig",
6-
"esbenp.prettier-vscode",
7-
"dozerg.tsimportsorter",
8-
"oven.bun-vscode"
9-
]
2+
"recommendations": ["ms-azuretools.vscode-docker", "biomejs.biome", "oven.bun-vscode"]
103
}

.vscode/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"editor.detectIndentation": false,
33
"editor.tabSize": 4,
44
"editor.insertSpaces": false,
5-
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"files.insertFinalNewline": true,
6+
"editor.defaultFormatter": "biomejs.biome",
67
"editor.formatOnPaste": true,
78
"editor.formatOnSave": true,
89
"editor.codeActionsOnSave": {
9-
"source.organizeImports.sortImports": "explicit"
10-
},
11-
"eslint.validate": ["javascript", "typescript"]
10+
"source.organizeImports.biome": "explicit"
11+
}
1212
}

Dockerfile

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
# syntax = docker/dockerfile:1
22

3-
# Adjust BUN_VERSION as desired
4-
ARG BUN_VERSION=latest
5-
FROM oven/bun:${BUN_VERSION} as base
3+
# use bun image for throw-away build stage
4+
FROM oven/bun:latest AS build
65

7-
LABEL fly_launch_runtime="Bun"
8-
9-
# Bun app lives here
106
WORKDIR /app
117

12-
# Throw-away build stage to reduce size of final image
13-
FROM base as build
14-
15-
# Install packages needed to build node modules
8+
# install packages needed to build dependencies
169
RUN apt-get update -qq
1710
RUN apt-get install -y build-essential pkg-config python-is-python3
1811

19-
# Copy application code
20-
COPY --link bun.lockb package.json ./
12+
# copy application code
13+
COPY --link bun.lock package.json ./
2114
COPY --link . .
2215

23-
# Clear node_modules folder and install production dependencies only
24-
RUN rm -rf node_modules
25-
RUN bun i --ignore-scripts --frozen-lockfile --production
16+
# install dependencies, lint project, build frontend, and compile backend
17+
RUN bun install --ignore-scripts --frozen-lockfile
18+
RUN bun run biome ci .
19+
RUN bun run build:prod
20+
RUN bun run compile
2621

27-
# Final stage for app image
28-
FROM base
22+
# minimalist final stage for app image
23+
FROM gcr.io/distroless/base
2924

30-
# Copy built application
31-
COPY --from=build /app /app
25+
# copy built application
26+
COPY --from=build /app/main /app/main
27+
28+
WORKDIR /app
3229

33-
# Start the server by default, this can be overwritten at runtime
30+
# start the server
3431
EXPOSE 8080
35-
CMD [ "bun", "start" ]
32+
ENTRYPOINT ["./main"]

0 commit comments

Comments
 (0)