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
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,22 @@ This project and everyone participating in it is governed by our Code of Conduct

5. Push to your fork and create a Pull Request

6. Pre-commit Hooks:

We use [husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/okonet/lint-staged) to automatically run linting and formatting on staged files before each commit. This helps maintain code quality and consistency.

The pre-commit hooks are configured to run:
- `pnpm lint`: Lints the staged files using ESLint
- `pnpm format`: Formats the staged files using Prettier

If either of these commands fails due to linting errors or formatting issues, the commit will be aborted. Please fix the reported issues and try committing again.

You can also run the lint and format commands manually at any time:
```bash
pnpm lint # Lint all files
pnpm format # Format all files
```

## Package-Specific Guidelines

### Agent Development
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
"changeset": "changeset",
"version": "changeset version",
"release": "changeset publish",
"cli": "cd packages/cli && node --no-deprecation bin/cli.js"
"cli": "cd packages/cli && node --no-deprecation bin/cli.js",
"prepare": "husky"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"pnpm lint",
"pnpm format"
]
},
"dependencies": {
"rimraf": "^6.0.1"
Expand All @@ -39,6 +46,8 @@
"eslint-plugin-prettier": "^5",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-unused-imports": "^4.1.4",
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"prettier": "^3.5.1",
"typescript-eslint": "^8.23.0"
},
Expand Down
Loading
Loading