-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #612 from protofire/fix/remove-husky
Removed husky
- Loading branch information
Showing
7 changed files
with
54 additions
and
51 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Setting up Git Hooks | ||
|
||
After cloning the repository, set up the pre-commit hook by running the following commands: | ||
|
||
`git config --unset core.hooksPath` | ||
To reset the hooks config to git default | ||
|
||
```sh | ||
touch .git/hooks/pre-commit | ||
chmod +x .git/hooks/pre-commit | ||
echo '#!/bin/sh\nnode scripts/check-changes.js' > .git/hooks/pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,10 +34,12 @@ | |
"/solhint.js" | ||
], | ||
"author": "Ilya Drabenia <[email protected]>", | ||
"contributors": ["Diego Bale <[email protected]>"], | ||
"contributors": [ | ||
"Diego Bale <[email protected]>" | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"@solidity-parser/parser": "^0.18.0", | ||
"@solidity-parser/parser": "^0.19.0", | ||
"ajv": "^6.12.6", | ||
"antlr4": "^4.13.1-patch-1", | ||
"ast-parents": "^0.0.1", | ||
|
@@ -64,7 +66,6 @@ | |
"eslint-config-prettier": "^8.6.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"husky": "^8.0.3", | ||
"markdown-table": "^2.0.0", | ||
"mocha": "^10.2.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { execSync } = require('child_process'); | ||
|
||
function changed() { | ||
try { | ||
// Run Git commands to check for changes in the lib/rules directory | ||
const diffIndex = execSync('git diff-index --name-only -B -R -M -C HEAD lib/rules').toString().trim(); | ||
const lsFiles = execSync('git ls-files -t -o -m lib/rules').toString().trim(); | ||
|
||
// Return true if there are changes | ||
return diffIndex !== '' || lsFiles !== ''; | ||
} catch (error) { | ||
console.error('Error checking for changes:', error); | ||
return false; | ||
} | ||
} | ||
|
||
if (changed()) { | ||
try { | ||
// Run npm commands if there are changes | ||
execSync('npm run generate-rulesets', { stdio: 'inherit' }); | ||
execSync('npm run docs', { stdio: 'inherit' }); | ||
} catch (error) { | ||
console.error('Error running npm commands:', error); | ||
process.exit(1); | ||
} | ||
} else { | ||
console.log('No changes detected in lib/rules.'); | ||
} |
This file was deleted.
Oops, something went wrong.