Skip to content

Commit 49d1975

Browse files
Merge pull request #675 from aXenDeveloper/replace_eslint_to_biome
feat!: Replace eslint & prettier to biome
2 parents f572038 + ef532fd commit 49d1975

File tree

430 files changed

+6398
-9244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

430 files changed

+6398
-9244
lines changed

.github/copilot-instructions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
The repository is a monorepo for the VitNode framework, which includes a backend API, frontend documentation site, and shared packages. The codebase uses modern web technologies and follows specific conventions for development based on Next.js 15 and Hono.js 4.
44

5+
- Do not nest ternary operators,
6+
57
## Architecture & Key Patterns
68

79
- **Monorepo Structure:**
810
- `apps/` contains main apps (`api` for backend, `docs` for docs site)
9-
- `packages/` holds shared code, core framework, ESLint/Prettier configs, and CLI tools
11+
- `packages/` holds shared code, core framework, Biome configs, and CLI tools
1012
- `plugins/` for extendable features
1113
- **Frontend:**
1214
- Next.js 15, App Router, Server Components
@@ -33,9 +35,9 @@ The repository is a monorepo for the VitNode framework, which includes a backend
3335
- `pnpm dev` (dev server), `pnpm build`, `pnpm lint`, `pnpm db:push`, `pnpm db:migrate`, `pnpm docker:dev`
3436
- **CLI:**
3537
- Create apps/plugins via `pnpm create vitnode-app@canary` (see `packages/create-vitnode-app`)
36-
- CLI prompts for package manager, app mode, ESLint, Docker, install (see `questions.ts`)
38+
- CLI prompts for package manager, app mode, Biome, Docker, install (see `questions.ts`)
3739
- **Linting/Formatting:**
38-
- Use configs from `packages/eslint/`
40+
- Use configs from `packages/config/`
3941
- File names: snake_case, ESModule only
4042
- TypeScript 5 strict mode
4143
- **Testing:**

.github/docs/prd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ VitNode is designed for individual developers and small teams who need a structu
4646
### CI/CD
4747

4848
- Automated workflows using GitHub Actions:
49-
- Code quality checks (ESLint, Prettier, TypeScript)
49+
- Code quality checks (Biome, TypeScript)
5050
- Test suite execution with Vitest and Playwright
5151
- Dependency security scanning with npm audit
5252
- Automated builds and deployments to Vercel
@@ -165,7 +165,7 @@ VitNode is designed for individual developers and small teams who need a structu
165165
- Turborepo for monorepo management
166166
- Vitest for unit testing
167167
- Playwright for end-to-end testing
168-
- ESLint and Prettier for code quality
168+
- Biome for code quality
169169
- Docker for containerization
170170

171171
## Features Planned for Future Releases

.github/workflows/bump_publish.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ on:
1212
- stable
1313
- release-candidate
1414
type:
15-
description: 'Type of package to publish'
15+
description: "Type of package to publish"
1616
required: true
1717
type: choice
1818
options:
1919
- patch
2020
- minor
2121
- major
2222
mode:
23-
description: 'Mode of package to publish'
23+
description: "Mode of package to publish"
2424
required: true
2525
type: choice
2626
options:
2727
- bump_and_publish
2828
- bump
2929
- publish
3030
skip_release_github_patch_notes:
31-
description: 'Skip generating release notes for GitHub patch notes?'
31+
description: "Skip generating release notes for GitHub patch notes?"
3232
required: false
3333
type: boolean
3434

3535
jobs:
3636
bump-version:
37-
name: 'Bump Version'
37+
name: "Bump Version"
3838
runs-on: ubuntu-latest
3939
permissions:
4040
contents: write
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install Node.js
5858
uses: actions/setup-node@v4
5959
with:
60-
registry-url: 'https://registry.npmjs.org/'
60+
registry-url: "https://registry.npmjs.org/"
6161
node-version: 22
6262

6363
- name: Install dependencies
@@ -82,21 +82,21 @@ jobs:
8282

8383
- name: Publish canary
8484
if: ${{ (github.event.inputs.mode == 'bump_and_publish' || github.event.inputs.mode == 'publish') && github.event.inputs.release == 'canary' }}
85-
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/eslint-config --filter @vitnode/blog --tag canary --no-git-checks --access public
85+
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/config --filter @vitnode/blog --tag canary --no-git-checks --access public
8686
env:
8787
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8888
NPM_CONFIG_PROVENANCE: true
8989

9090
- name: Publish release candidate
9191
if: ${{ (github.event.inputs.mode == 'bump_and_publish' || github.event.inputs.mode == 'publish') && github.event.inputs.release == 'release-candidate' }}
92-
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/eslint-config --filter @vitnode/blog --tag rc --no-git-checks --access public
92+
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/config --filter @vitnode/blog --tag rc --no-git-checks --access public
9393
env:
9494
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9595
NPM_CONFIG_PROVENANCE: true
9696

9797
- name: Publish stable
9898
if: ${{ (github.event.inputs.mode == 'bump_and_publish' || github.event.inputs.mode == 'publish') && github.event.inputs.release == 'stable' }}
99-
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/eslint-config --filter @vitnode/blog --tag latest --no-git-checks --access public
99+
run: pnpm publish --filter create-vitnode-app --filter @vitnode/core --filter @vitnode/config --filter @vitnode/blog --tag latest --no-git-checks --access public
100100
env:
101101
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
102102
NPM_CONFIG_PROVENANCE: true

.prettierrc.mjs

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

.vscode/settings.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,29 @@
77
],
88
"search.exclude": {
99
"**/(plugins)/*": true
10+
},
11+
"[javascriptreact]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
},
14+
"[typescript]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
},
17+
"[css]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"[jsonc]": {
21+
"editor.defaultFormatter": "biomejs.biome"
22+
},
23+
"[typescriptreact]": {
24+
"editor.defaultFormatter": "biomejs.biome"
25+
},
26+
"[html]": {
27+
"editor.defaultFormatter": "biomejs.biome"
28+
},
29+
"[json]": {
30+
"editor.defaultFormatter": "biomejs.biome"
31+
},
32+
"[javascript]": {
33+
"editor.defaultFormatter": "biomejs.biome"
1034
}
1135
}

apps/api/drizzle.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { defineVitNodeDrizzleConfig } from '@vitnode/core/drizzle.config';
1+
import { defineVitNodeDrizzleConfig } from "@vitnode/core/drizzle.config";
22

3-
import { POSTGRES_URL, vitNodeApiConfig } from './src/vitnode.api.config';
3+
import { POSTGRES_URL, vitNodeApiConfig } from "./src/vitnode.api.config";
44

55
export default defineVitNodeDrizzleConfig({
66
vitNodeApiConfig,
7-
out: './migrations/',
8-
dialect: 'postgresql',
7+
out: "./migrations/",
8+
dialect: "postgresql",
99
dbCredentials: {
1010
url: POSTGRES_URL,
1111
},

apps/api/eslint.config.mjs

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

apps/api/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
"dev:email": "email dev --dir src/emails",
1212
"build": "tsc && tsc-alias -p tsconfig.json",
1313
"start": "node dist/index.js",
14-
"lint": "eslint .",
15-
"lint:fix": "eslint . --fix",
1614
"drizzle-kit": "drizzle-kit"
1715
},
1816
"dependencies": {
@@ -34,9 +32,8 @@
3432
"@types/node": "^24.3.0",
3533
"@types/react": "^19.1.10",
3634
"@types/react-dom": "^19.1.7",
37-
"@vitnode/eslint-config": "workspace:*",
35+
"@vitnode/config": "workspace:*",
3836
"dotenv": "^17.2.1",
39-
"eslint": "^9.33.0",
4037
"react-email": "^4.2.8",
4138
"tsc-alias": "^1.8.16",
4239
"tsx": "^4.20.4",

apps/api/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { serve } from '@hono/node-server';
2-
import { OpenAPIHono } from '@hono/zod-openapi';
3-
import { VitNodeAPI } from '@vitnode/core/api/config';
1+
import { serve } from "@hono/node-server";
2+
import { OpenAPIHono } from "@hono/zod-openapi";
3+
import { VitNodeAPI } from "@vitnode/core/api/config";
44

5-
import { vitNodeApiConfig } from './vitnode.api.config.js';
5+
import { vitNodeApiConfig } from "./vitnode.api.config.js";
66

7-
const app = new OpenAPIHono().basePath('/api');
7+
const app = new OpenAPIHono().basePath("/api");
88

99
VitNodeAPI({
1010
app,
@@ -17,9 +17,9 @@ serve(
1717
port: 8080,
1818
},
1919
info => {
20-
const initMessage = '\x1b[34m[VitNode]\x1b[0m';
20+
const initMessage = "\x1b[34m[VitNode]\x1b[0m";
2121

22-
// eslint-disable-next-line no-console
22+
// biome-ignore lint/suspicious/noConsole: <start>
2323
console.log(
2424
`${initMessage} API server is running on http://localhost:${info.port}`,
2525
);

apps/api/src/vitnode.api.config.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import { NodemailerEmailAdapter } from '@vitnode/core/api/adapters/email/nodemailer';
2-
import { buildApiConfig } from '@vitnode/core/vitnode.config';
3-
import * as dotenv from 'dotenv';
4-
import { drizzle } from 'drizzle-orm/postgres-js';
1+
import { NodemailerEmailAdapter } from "@vitnode/core/api/adapters/email/nodemailer";
2+
import { buildApiConfig } from "@vitnode/core/vitnode.config";
3+
import { config } from "dotenv";
4+
import { drizzle } from "drizzle-orm/postgres-js";
55

6-
dotenv.config({
6+
config({
77
quiet: true,
88
});
99

1010
export const POSTGRES_URL =
11-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
12-
process.env.POSTGRES_URL || 'postgresql://root:root@localhost:5432/vitnode';
11+
process.env.POSTGRES_URL || "postgresql://root:root@localhost:5432/vitnode";
1312

1413
export const vitNodeApiConfig = buildApiConfig({
1514
plugins: [],
1615
pathToMessages: async path => await import(`./locales/${path}`),
1716
dbProvider: drizzle({
1817
connection: POSTGRES_URL,
19-
casing: 'camelCase',
18+
casing: "camelCase",
2019
}),
2120
email: {
2221
adapter: NodemailerEmailAdapter({
@@ -26,12 +25,12 @@ export const vitNodeApiConfig = buildApiConfig({
2625
user: process.env.NOD_EMAILER_USER,
2726
}),
2827
logo: {
29-
text: 'VitNode Email Test',
30-
src: 'http://localhost:3000/logo_vitnode_dark.png',
28+
text: "VitNode Email Test",
29+
src: "http://localhost:3000/logo_vitnode_dark.png",
3130
},
3231
},
3332
metadata: {
34-
title: 'VitNode API',
35-
shortTitle: 'VitNode',
33+
title: "VitNode API",
34+
shortTitle: "VitNode",
3635
},
3736
});

0 commit comments

Comments
 (0)