Skip to content

Commit 52dfded

Browse files
committed
feat: Add config biome
1 parent d0a035c commit 52dfded

File tree

27 files changed

+357
-882
lines changed

27 files changed

+357
-882
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The repository is a monorepo for the VitNode framework, which includes a backend
3737
- Create apps/plugins via `pnpm create vitnode-app@canary` (see `packages/create-vitnode-app`)
3838
- CLI prompts for package manager, app mode, Biome, Docker, install (see `questions.ts`)
3939
- **Linting/Formatting:**
40-
- Use configs from `packages/eslint/`
40+
- Use configs from `packages/config/`
4141
- File names: snake_case, ESModule only
4242
- TypeScript 5 strict mode
4343
- **Testing:**

.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

apps/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/node": "^24.3.0",
3333
"@types/react": "^19.1.10",
3434
"@types/react-dom": "^19.1.7",
35-
"@vitnode/eslint-config": "workspace:*",
35+
"@vitnode/config": "workspace:*",
3636
"dotenv": "^17.2.1",
3737
"react-email": "^4.2.8",
3838
"tsc-alias": "^1.8.16",

apps/api/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
3-
"extends": "@vitnode/eslint-config/tsconfig",
3+
"extends": "@vitnode/config/tsconfig",
44
"compilerOptions": {
55
"target": "ESNext",
66
"module": "NodeNext",

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

Lines changed: 6 additions & 8 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-
│ ├── eslint/ # ESLint configurations for workspaces
87+
│ ├── config/ # Shared Biome,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
94-
plugins all live together in harmony!
93+
VitNode uses Turborepo to keep everything organized. Apps, packages, and plugins all live together
94+
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 ESLint configuration in each workspace ([ESLint](https://eslint.org/))
101+
- Respect the Biome configuration in each workspace ([Biome](https://biomejs.dev/))
102102
- Format your code with Prettier ([Prettier](https://prettier.io/))
103103
- Use React Server Components where appropriate
104104
- Write meaningful commit messages ([Conventional Commits](https://www.conventionalcommits.org/))
@@ -139,7 +139,7 @@ pnpm db:migrate # Run migrations
139139
- TypeScript for type safety
140140
- ESM module conventions
141141
- React Server Components where appropriate
142-
- Respect ESLint rules in each workspace
142+
- Respect Biome rules in each workspace
143143

144144
<Callout type="warn">
145145
Don't forget to test your changes locally! 🧪
@@ -192,6 +192,4 @@ pnpm db:migrate # Run migrations
192192

193193
Thank you for contributing to VitNode! 🚀
194194

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

apps/docs/next.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
import nextAnalyzer from "@next/bundle-analyzer";
12
import { vitNodeNextConfig } from "@vitnode/core/config/next.config";
23
import { createMDX } from "fumadocs-mdx/next";
34
import type { NextConfig } from "next";
45

56
const withMDX = createMDX();
67

8+
const withBundleAnalyzer = nextAnalyzer({
9+
enabled: process.env.ANALYZE === "true",
10+
});
11+
712
const nextConfig: NextConfig = {
813
experimental: {
914
inlineCss: true,
10-
reactCompiler: true,
15+
reactCompiler: process.env.ANALYZE !== "true",
1116
},
1217
};
1318

14-
export default withMDX(vitNodeNextConfig(nextConfig));
19+
export default withBundleAnalyzer(withMDX(vitNodeNextConfig(nextConfig)));

apps/docs/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dev": "vitnode init && next dev --turbopack",
1212
"dev:email": "email dev --dir src/emails",
1313
"build": "next build --turbopack",
14+
"build:analyze": "ANALYZE=true next build",
1415
"start": "next start",
1516
"test:e2e": "playwright test",
1617
"test:e2e:ui": "playwright test --ui",
@@ -42,14 +43,15 @@
4243
"sonner": "^2.0.7"
4344
},
4445
"devDependencies": {
46+
"@next/bundle-analyzer": "^15.5.0",
4547
"@playwright/test": "^1.55.0",
4648
"@react-email/components": "^0.5.1",
4749
"@tailwindcss/postcss": "^4.1.12",
4850
"@types/mdx": "^2.0.13",
4951
"@types/node": "^24.3.0",
5052
"@types/react": "^19.1.10",
5153
"@types/react-dom": "^19.1.7",
52-
"@vitnode/eslint-config": "workspace:*",
54+
"@vitnode/config": "workspace:*",
5355
"class-variance-authority": "^0.7.1",
5456
"postcss": "^8.5.6",
5557
"react-email": "^4.2.8",

apps/docs/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json.schemastore.org/tsconfig",
3-
"extends": "@vitnode/eslint-config/tsconfig",
3+
"extends": "@vitnode/config/tsconfig",
44
"compilerOptions": {
55
"target": "ESNext",
66
"module": "esnext",

biome.json

Lines changed: 3 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,8 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
3-
"vcs": {
4-
"enabled": true,
5-
"clientKind": "git",
6-
"useIgnoreFile": true
7-
},
3+
"extends": ["@vitnode/config/biome"],
4+
"root": true,
85
"files": {
9-
"ignoreUnknown": true,
10-
"includes": [
11-
"**",
12-
"!node_modules",
13-
"!.next",
14-
"!dist",
15-
"!build",
16-
"!.turbo",
17-
"!.source",
18-
"!docker"
19-
]
20-
},
21-
"formatter": {
22-
"enabled": true,
23-
"indentStyle": "space",
24-
"indentWidth": 2,
25-
"lineWidth": 80
26-
},
27-
"javascript": {
28-
"formatter": {
29-
"quoteStyle": "double",
30-
"jsxQuoteStyle": "double",
31-
"arrowParentheses": "asNeeded"
32-
}
33-
},
34-
"linter": {
35-
"enabled": true,
36-
"rules": {
37-
"recommended": true,
38-
"complexity": {
39-
"useLiteralKeys": "off",
40-
"noExcessiveCognitiveComplexity": "warn",
41-
"noExcessiveNestedTestSuites": "warn",
42-
"noUselessStringConcat": "error",
43-
"useSimplifiedLogicExpression": "warn"
44-
},
45-
"suspicious": {
46-
"noConsole": "error",
47-
"noAlert": "error",
48-
"noSkippedTests": "warn",
49-
"noVar": "error",
50-
"useAwait": "error",
51-
"useIterableCallbackReturn": "off"
52-
},
53-
"correctness": {
54-
"noNestedComponentDefinitions": "error",
55-
"noReactPropAssignments": "error",
56-
"noRenderReturnValue": "error",
57-
"useJsonImportAttributes": "warn",
58-
"useUniqueElementIds": "off"
59-
},
60-
"performance": {
61-
"noAwaitInLoops": "error",
62-
"noDelete": "error",
63-
"noNamespaceImport": "error"
64-
},
65-
"style": {
66-
"noCommonJs": "error",
67-
"noEnum": "error",
68-
"noExportedImports": "warn",
69-
"noInferrableTypes": "error",
70-
"noNegationElse": "warn",
71-
"noNestedTernary": "error",
72-
"noSubstr": "error",
73-
"noUnusedTemplateLiteral": "warn",
74-
"noUselessElse": "warn",
75-
"noYodaExpression": "warn",
76-
"useAtIndex": "warn",
77-
"useCollapsedIf": "warn",
78-
"useConsistentArrayType": "warn",
79-
"useConsistentBuiltinInstantiation": "error",
80-
"useExportsLast": "warn",
81-
"useObjectSpread": "warn",
82-
"useSelfClosingElements": "warn",
83-
"useShorthandAssign": "warn",
84-
"useSingleVarDeclarator": "error",
85-
"useThrowNewError": "error",
86-
"useTrimStartEnd": "warn"
87-
}
88-
},
89-
"domains": {
90-
"next": "recommended",
91-
"react": "recommended",
92-
"test": "recommended"
93-
}
94-
},
95-
"assist": {
96-
"actions": {
97-
"source": {
98-
"organizeImports": "on"
99-
}
100-
}
6+
"includes": ["!create-vitnode-app/biome"]
1017
}
1028
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"devDependencies": {
2121
"@biomejs/biome": "^2.2.2",
2222
"@types/node": "^24.3.0",
23-
"@vitnode/eslint-config": "workspace:*",
23+
"@vitnode/config": "workspace:*",
2424
"tsx": "^4.20.4",
2525
"turbo": "^2.5.6",
2626
"typescript": "^5.9.2",

0 commit comments

Comments
 (0)