Skip to content

Commit 6810f9c

Browse files
committed
refactor!: Restore biom to eslint
1 parent 3d7d499 commit 6810f9c

File tree

228 files changed

+3686
-4127
lines changed

Some content is hidden

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

228 files changed

+3686
-4127
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The repository is a monorepo for the VitNode framework, which includes a backend
88

99
- **Monorepo Structure:**
1010
- `apps/` contains main apps (`api` for backend, `docs` for docs site)
11-
- `packages/` holds shared code, core framework, Biome configs, and CLI tools
11+
- `packages/` holds shared code, core framework, ESLint and Prettier configs, and CLI tools
1212
- `plugins/` for extendable features
1313
- **Frontend:**
1414
- Next.js 15, App Router, Server Components
@@ -35,7 +35,7 @@ The repository is a monorepo for the VitNode framework, which includes a backend
3535
- `pnpm dev` (dev server), `pnpm build`, `pnpm lint`, `pnpm db:migrate`, `pnpm docker:dev`
3636
- **CLI:**
3737
- Create apps/plugins via `pnpm create vitnode-app@canary` (see `packages/create-vitnode-app`)
38-
- CLI prompts for package manager, app mode, Biome, Docker, install (see `questions.ts`)
38+
- CLI prompts for package manager, app mode, ESLint, Prettier, Docker, install (see `questions.ts`)
3939
- **Linting/Formatting:**
4040
- Use configs from `packages/config/`
4141
- File names: snake_case, ESModule only

.prettierrc.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import vitnodePrettier from "@vitnode/config/prettierrc";
2+
3+
/**
4+
* @see https://prettier.io/docs/en/configuration.html
5+
* @type {import("prettier").Config}
6+
*/
7+
const config = {
8+
...vitnodePrettier,
9+
};
10+
11+
export default config;

.vscode/settings.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,5 @@
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"
3410
}
3511
}

apps/api/eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import eslintVitNode from "@vitnode/config/eslint";
2+
import { fileURLToPath } from "node:url";
3+
import { dirname } from "node:path";
4+
5+
const __dirname = dirname(fileURLToPath(import.meta.url));
6+
7+
export default [
8+
...eslintVitNode,
9+
{
10+
ignores: ["drizzle.config.ts"],
11+
},
12+
{
13+
languageOptions: {
14+
parserOptions: {
15+
project: "./tsconfig.json",
16+
tsconfigRootDir: __dirname,
17+
},
18+
},
19+
},
20+
];

apps/api/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"dev:email": "email dev --dir src/emails",
1010
"build": "tsc && tsc-alias -p tsconfig.json",
1111
"start": "node dist/index.js",
12-
"drizzle-kit": "drizzle-kit"
12+
"drizzle-kit": "drizzle-kit",
13+
"lint": "eslint .",
14+
"lint:fix": "eslint . --fix"
1315
},
1416
"dependencies": {
1517
"@hono/zod-openapi": "^1.1.0",
@@ -32,6 +34,7 @@
3234
"@types/react-dom": "^19.1.9",
3335
"@vitnode/config": "workspace:*",
3436
"dotenv": "^17.2.2",
37+
"eslint": "^9.36.0",
3538
"react-email": "^4.2.8",
3639
"tsc-alias": "^1.8.16",
3740
"tsx": "^4.20.5",

apps/api/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ serve(
1919
info => {
2020
const initMessage = "\x1b[34m[VitNode]\x1b[0m";
2121

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ config({
88
});
99

1010
export const POSTGRES_URL =
11-
process.env.POSTGRES_URL || "postgresql://root:root@localhost:5432/vitnode";
11+
process.env.POSTGRES_URL ?? "postgresql://root:root@localhost:5432/vitnode";
1212

1313
export const vitNodeApiConfig = buildApiConfig({
1414
plugins: [],

apps/docs/content/docs/dev/contribution.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ vitnode/
8484
│ └── docs/ # Documentation site
8585
├── packages/
8686
│ ├── vitnode/ # Core framework code
87-
│ ├── config/ # Shared Biome,TypeScript configs
87+
│ ├── config/ # Shared ESLInt, TypeScript configs
8888
│ └── create-vitnode-app/ # CLI tool for creating new projects
8989
└── plugins/ # Official open-source plugins
9090
```
9191

9292
<Callout type="info" title="Monorepo Magic!">
93-
VitNode uses Turborepo to keep everything organized. Apps, packages, and plugins all live together
94-
in harmony!
93+
VitNode uses Turborepo to keep everything organized. Apps, packages, and
94+
plugins all live together in harmony!
9595
</Callout>
9696

9797
## Coding Standards
9898

9999
- We use TypeScript for type safety ([TypeScript Docs](https://www.typescriptlang.org/))
100100
- Follow ESM (ECMAScript Modules) conventions ([ESM Guide](https://nodejs.org/api/esm.html))
101-
- Respect the Biome configuration in each workspace ([Biome](https://biomejs.dev/))
101+
- Respect the ESLint & Prettier configuration in each workspace ([ESLint](https://eslint.org/) & [Prettier](https://prettier.io/))
102102
- Use React Server Components where appropriate
103103
- Write meaningful commit messages ([Conventional Commits](https://www.conventionalcommits.org/))
104104

@@ -137,7 +137,7 @@ pnpm db:migrate # Run migrations
137137
- TypeScript for type safety
138138
- ESM module conventions
139139
- React Server Components where appropriate
140-
- Respect Biome rules in each workspace
140+
- Respect ESLint, Prettier rules in each workspace
141141

142142
<Callout type="warn">
143143
Don't forget to test your changes locally! 🧪
@@ -190,4 +190,6 @@ pnpm db:migrate # Run migrations
190190

191191
Thank you for contributing to VitNode! 🚀
192192

193-
<Callout title="You rock!">Every contribution makes VitNode better. We appreciate you! 💜</Callout>
193+
<Callout title="You rock!">
194+
Every contribution makes VitNode better. We appreciate you! 💜
195+
</Callout>

apps/docs/eslint.config.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import eslintVitNode from "@vitnode/config/eslint";
2+
import { fileURLToPath } from "node:url";
3+
import { dirname } from "node:path";
4+
5+
const __dirname = dirname(fileURLToPath(import.meta.url));
6+
7+
export default [
8+
...eslintVitNode,
9+
{
10+
ignores: [".source"],
11+
},
12+
{
13+
languageOptions: {
14+
parserOptions: {
15+
project: "./tsconfig.json",
16+
tsconfigRootDir: __dirname,
17+
},
18+
},
19+
},
20+
];

apps/docs/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"test:e2e:debug": "playwright test --debug",
1818
"test:e2e:report": "playwright show-report",
1919
"postinstall": "fumadocs-mdx",
20-
"drizzle-kit": "drizzle-kit"
20+
"drizzle-kit": "drizzle-kit",
21+
"lint": "eslint .",
22+
"lint:fix": "eslint . --fix"
2123
},
2224
"dependencies": {
2325
"@hono/zod-openapi": "^1.1.0",
@@ -53,6 +55,7 @@
5355
"@types/react-dom": "^19.1.9",
5456
"@vitnode/config": "workspace:*",
5557
"class-variance-authority": "^0.7.1",
58+
"eslint": "^9.36.0",
5659
"postcss": "^8.5.6",
5760
"react-email": "^4.2.8",
5861
"shiki": "^3.12.2",

0 commit comments

Comments
 (0)