Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ root = true

[*]
indent_style = tab
indent_size = 2
Comment thread
dreyfus92 marked this conversation as resolved.
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,json,yaml}]
indent_style = space
indent_size = 2
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"biomejs.biome"
]
}
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Thank you for your interest in contributing to Clack! This document provides det
### Prerequisites

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

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.

Expand Down Expand Up @@ -63,16 +63,16 @@ If you want to test changes to Clack packages in your own project, you can use p
```bash
# In your project
cd /path/to/your-project

# Link @clack/core
pnpm link --global /path/to/clack/packages/core

# Link @clack/prompts
pnpm link --global /path/to/clack/packages/prompts
```

**Method 2: Using local path in package.json**

In your project's package.json, reference the local paths:
```json
{
Expand All @@ -97,7 +97,7 @@ If you want to test changes to Clack packages in your own project, you can use p
# In the clack repository
cd /path/to/clack
pnpm build

# In your project (if using Method 2)
cd /path/to/your-project
pnpm install
Expand Down Expand Up @@ -125,11 +125,11 @@ clack/

### Key Packages

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

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

### Common Commands

- **Build all packages**:
- **Build all packages**:
```bash
pnpm build
```
Expand Down Expand Up @@ -194,14 +194,14 @@ The `examples/` directory contains sample projects that demonstrate how to use C
```bash
# Ensure everything builds
pnpm build

# Check formatting and lint issues
pnpm format
pnpm lint

# Verify type correctness
pnpm types

# Run tests
pnpm test
```
Expand Down Expand Up @@ -269,7 +269,7 @@ When encountering issues during development:

### PR Previews

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.
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.

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.

Expand All @@ -295,10 +295,10 @@ Clack maintains a stable `v0` branch alongside the main development branch. For
# Ensure you have the latest v0 branch
git checkout v0
git pull upstream v0

# Cherry-pick the squashed commit from main
git cherry-pick <commit-hash>

# Push the changes
git push upstream v0
```
Expand Down
57 changes: 23 additions & 34 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": { "ignoreUnknown": false, "includes": ["**", "!**/dist/**"] },
"formatter": {
"$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": ["**", "!pnpm-lock.yaml", "!**/dist", "!**/node_modules", "!**/.vscode"]
},
"formatter": {
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "tab",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 100,
"attributePosition": "auto",
"bracketSpacing": true,
"includes": [
"**",
"!**/.github/workflows/**/*.yml",
"!**/.changeset/**/*.md",
"!**/pnpm-lock.yaml",
"!**/package.json"
]
"lineWidth": 100
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": { "recommended": true, "suspicious": { "noExplicitAny": "off" } }
"rules": {
"preset": "recommended",
"suspicious": {
"noExplicitAny": "off"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "es5",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
"trailingCommas": "es5"
}
},
"overrides": [
{
"includes": ["**/*.json", "**/*.toml", "**/*.yml"],
"formatter": { "indentStyle": "space" }
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"pretest": "pnpm run build"
},
"devDependencies": {
"@biomejs/biome": "^2.1.2",
"@biomejs/biome": "^2.5.12",
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.0",
"@types/node": "^20.19.39",
Expand Down
74 changes: 37 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading