Skip to content

Commit c681d2b

Browse files
authored
chore: update biome and config file (#602)
1 parent de1ef16 commit c681d2b

6 files changed

Lines changed: 82 additions & 87 deletions

File tree

‎.editorconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ root = true
22

33
[*]
44
indent_style = tab
5+
indent_size = 2
56
end_of_line = lf
67
charset = utf-8
78
trim_trailing_whitespace = true
89
insert_final_newline = true
910

1011
[*.{yml,json,yaml}]
1112
indent_style = space
12-
indent_size = 2

‎.vscode/extensions.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"EditorConfig.EditorConfig",
4+
"biomejs.biome"
5+
]
6+
}

‎CONTRIBUTING.md‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Thank you for your interest in contributing to Clack! This document provides det
1010
### Prerequisites
1111

1212
- [Node.js](https://nodejs.org/) (version specified in `.nvmrc`, currently v20.18.1)
13-
- [pnpm](https://pnpm.io/) (version 9.14.2 or higher)
13+
- [pnpm](https://pnpm.io/) (version 10.33.0 or higher)
1414

1515
If you use [volta](https://volta.sh/) or [nvm](https://github.com/nvm-sh/nvm), the correct Node.js version will be automatically selected based on the project's `.nvmrc` file.
1616

@@ -63,16 +63,16 @@ If you want to test changes to Clack packages in your own project, you can use p
6363
```bash
6464
# In your project
6565
cd /path/to/your-project
66-
66+
6767
# Link @clack/core
6868
pnpm link --global /path/to/clack/packages/core
69-
69+
7070
# Link @clack/prompts
7171
pnpm link --global /path/to/clack/packages/prompts
7272
```
7373

7474
**Method 2: Using local path in package.json**
75-
75+
7676
In your project's package.json, reference the local paths:
7777
```json
7878
{
@@ -97,7 +97,7 @@ If you want to test changes to Clack packages in your own project, you can use p
9797
# In the clack repository
9898
cd /path/to/clack
9999
pnpm build
100-
100+
101101
# In your project (if using Method 2)
102102
cd /path/to/your-project
103103
pnpm install
@@ -125,11 +125,11 @@ clack/
125125

126126
### Key Packages
127127

128-
1. **@clack/core** (`packages/core/`):
128+
1. **@clack/core** (`packages/core/`):
129129
- Contains the unstyled, extensible primitives for building CLI applications
130130
- The foundation layer that provides the core functionality
131131

132-
2. **@clack/prompts** (`packages/prompts/`):
132+
2. **@clack/prompts** (`packages/prompts/`):
133133
- Built on top of @clack/core
134134
- Provides beautiful, ready-to-use CLI prompt components
135135
- What most users will interact with directly
@@ -142,7 +142,7 @@ The `examples/` directory contains sample projects that demonstrate how to use C
142142

143143
### Common Commands
144144

145-
- **Build all packages**:
145+
- **Build all packages**:
146146
```bash
147147
pnpm build
148148
```
@@ -194,14 +194,14 @@ The `examples/` directory contains sample projects that demonstrate how to use C
194194
```bash
195195
# Ensure everything builds
196196
pnpm build
197-
197+
198198
# Check formatting and lint issues
199199
pnpm format
200200
pnpm lint
201-
201+
202202
# Verify type correctness
203203
pnpm types
204-
204+
205205
# Run tests
206206
pnpm test
207207
```
@@ -269,7 +269,7 @@ When encountering issues during development:
269269

270270
### PR Previews
271271

272-
Clack uses [pkg.pr.new](https://pkg.pr.new) (provided by [bolt.new](https://bolt.new)) to create continuous preview releases of all PRs. This simplifies testing and makes verifying bug fixes easier for our dependents.
272+
Clack uses [pkg.pr.new](https://pkg.pr.new) (provided by [bolt.new](https://bolt.new)) to create continuous preview releases of all PRs. This simplifies testing and makes verifying bug fixes easier for our dependents.
273273

274274
The workflow that builds a preview version and adds instructions for installation as a comment on your PR should run automatically if you have contributed to Clack before. First-time contributors may need to wait until a maintainer manually approves GitHub Actions running on your PR.
275275

@@ -295,10 +295,10 @@ Clack maintains a stable `v0` branch alongside the main development branch. For
295295
# Ensure you have the latest v0 branch
296296
git checkout v0
297297
git pull upstream v0
298-
298+
299299
# Cherry-pick the squashed commit from main
300300
git cherry-pick <commit-hash>
301-
301+
302302
# Push the changes
303303
git push upstream v0
304304
```

‎biome.json‎

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3-
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
4-
"files": { "ignoreUnknown": false, "includes": ["**", "!**/dist/**"] },
5-
"formatter": {
2+
"$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
3+
"vcs": {
64
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"includes": ["**", "!pnpm-lock.yaml", "!**/dist", "!**/node_modules", "!**/.vscode"]
10+
},
11+
"formatter": {
712
"useEditorconfig": true,
8-
"formatWithErrors": false,
9-
"indentStyle": "tab",
10-
"indentWidth": 2,
11-
"lineEnding": "lf",
12-
"lineWidth": 100,
13-
"attributePosition": "auto",
14-
"bracketSpacing": true,
15-
"includes": [
16-
"**",
17-
"!**/.github/workflows/**/*.yml",
18-
"!**/.changeset/**/*.md",
19-
"!**/pnpm-lock.yaml",
20-
"!**/package.json"
21-
]
13+
"lineWidth": 100
2214
},
23-
"assist": { "actions": { "source": { "organizeImports": "on" } } },
2415
"linter": {
25-
"enabled": true,
26-
"rules": { "recommended": true, "suspicious": { "noExplicitAny": "off" } }
16+
"rules": {
17+
"preset": "recommended",
18+
"suspicious": {
19+
"noExplicitAny": "off"
20+
}
21+
}
2722
},
2823
"javascript": {
2924
"formatter": {
30-
"jsxQuoteStyle": "double",
31-
"quoteProperties": "asNeeded",
32-
"trailingCommas": "es5",
33-
"semicolons": "always",
34-
"arrowParentheses": "always",
35-
"bracketSameLine": false,
3625
"quoteStyle": "single",
37-
"attributePosition": "auto",
38-
"bracketSpacing": true
26+
"trailingCommas": "es5"
3927
}
4028
},
41-
"overrides": [
42-
{
43-
"includes": ["**/*.json", "**/*.toml", "**/*.yml"],
44-
"formatter": { "indentStyle": "space" }
29+
"assist": {
30+
"actions": {
31+
"source": {
32+
"organizeImports": "on"
33+
}
4534
}
46-
]
35+
}
4736
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"pretest": "pnpm run build"
1616
},
1717
"devDependencies": {
18-
"@biomejs/biome": "^2.1.2",
18+
"@biomejs/biome": "^2.5.12",
1919
"@changesets/changelog-github": "^0.7.0",
2020
"@changesets/cli": "^2.31.0",
2121
"@types/node": "^20.19.39",

‎pnpm-lock.yaml‎

Lines changed: 37 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)