mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00
Create pre-commit hooks with husky to enforce linting and formating for all commits (#1374)
* updated the hooks to ensure code cleanliness * updated package-lock for the CI/CD
This commit is contained in:
parent
a88d45d8b4
commit
29725445cc
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ node_modules
|
||||
*.vsix
|
||||
|
||||
.DS_Store
|
||||
|
||||
pnpm-lock.yaml
|
17
.husky/pre-commit
Executable file
17
.husky/pre-commit
Executable file
@ -0,0 +1,17 @@
|
||||
echo "Running pre-commit checks..."
|
||||
|
||||
# Run ESLint
|
||||
echo "Running ESLint..."
|
||||
npm run lint || {
|
||||
echo "❌ ESLint check failed. Please fix the errors and try committing again."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Run Prettier
|
||||
echo "Running Prettier..."
|
||||
npm run format || {
|
||||
echo "❌ Prettier check failed. Run 'npm run format:fix' to automatically fix formatting issues."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "✅ All checks passed!"
|
@ -1,5 +1,5 @@
|
||||
dist/
|
||||
node_modules
|
||||
webview-ui/build/
|
||||
CHANGELOG.md
|
||||
package-lock.json
|
||||
*.md
|
||||
package-lock.json
|
||||
|
22
package-lock.json
generated
22
package-lock.json
generated
@ -1,13 +1,12 @@
|
||||
{
|
||||
"name": "claude-dev",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "claude-dev",
|
||||
"version": "3.1.11",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.4",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/bedrock-sdk": "^0.10.2",
|
||||
@ -61,6 +60,7 @@
|
||||
"@vscode/test-electron": "^2.4.0",
|
||||
"esbuild": "^0.21.5",
|
||||
"eslint": "^8.57.0",
|
||||
"husky": "^9.1.7",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.3.3",
|
||||
"should": "^13.2.3",
|
||||
@ -7694,6 +7694,22 @@
|
||||
"ms": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "9.1.7",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
|
||||
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"husky": "bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/typicode"
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
|
@ -164,7 +164,8 @@
|
||||
"start:webview": "cd webview-ui && npm run start",
|
||||
"build:webview": "cd webview-ui && npm run build",
|
||||
"test:webview": "cd webview-ui && npm run test",
|
||||
"publish:marketplace": "vsce publish && ovsx publish"
|
||||
"publish:marketplace": "vsce publish && ovsx publish",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/diff": "^5.2.1",
|
||||
@ -178,6 +179,7 @@
|
||||
"@vscode/test-electron": "^2.4.0",
|
||||
"esbuild": "^0.21.5",
|
||||
"eslint": "^8.57.0",
|
||||
"husky": "^9.1.7",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.3.3",
|
||||
"should": "^13.2.3",
|
||||
|
Loading…
Reference in New Issue
Block a user