Skip to content

Commit

Permalink
move precommit logic from core/ to root
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed May 13, 2024
1 parent f8a5712 commit a5168aa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
npx lint-staged --allow-empty
7 changes: 3 additions & 4 deletions core/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"prettier",
"@typescript-eslint"
],
"rules": {
"no-throw-literal": "error",
"prettier/prettier": [
"error"
],
"prettier/prettier": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
Expand Down
4 changes: 0 additions & 4 deletions core/.husky/pre-commit

This file was deleted.

6 changes: 2 additions & 4 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"homepage": "https://github.com/Bisonai/orakl/tree/master/core#orakl-network-core",
"license": "MIT",
"scripts": {
"prepare": "cd .. && husky install core/.husky",
"clean": "rm -rf dist",
"prebuild": "yarn --cwd='../' vrf build && yarn --cwd='../' contracts-v01 build && yarn --cwd='../' util build",
"build": "yarn clean && tsc",
Expand Down Expand Up @@ -64,13 +63,13 @@
"aggregator-hash": "node --no-warnings --import=specifier-resolution-node/register --experimental-json-modules dist/cli/generate-aggregator-hash.js",
"flush": "node --no-warnings --import=specifier-resolution-node/register --experimental-json-modules dist/tools/flush-queues.js",
"test": "node --no-warnings --experimental-vm-modules node_modules/.bin/jest",
"lint": "DEBUG=eslint:cli-engine eslint 'src/**/*.ts' 'src/*.ts' 'test/*.ts'",
"lint": "DEBUG=eslint:cli-engine eslint --fix",
"bull-dashboard": "docker-compose -f docker-compose.bull-monitor.yaml up"
},
"dependencies": {
"@bisonai/orakl-contracts": "*",
"@bisonai/orakl-vrf": "*",
"@bisonai/orakl-util": "*",
"@bisonai/orakl-vrf": "*",
"@ethersproject/experimental": "^5.7.0",
"@slack/webhook": "^6.1.0",
"axios": "^1.2.2",
Expand Down Expand Up @@ -99,7 +98,6 @@
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.2",
"jest": "^29.3.1",
"prettier": "^2.8.1",
"prettier-plugin-organize-imports": "^3.2.3",
Expand Down
4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module.exports = {
"contracts/v0.2/**/*.sol": "yarn contracts-v02 lint",

"core/**/*": "yarn core test test",
"core/src/**/*.ts": "yarn core lint",
"core/test/**/*.ts": "yarn core lint",
};

0 comments on commit a5168aa

Please sign in to comment.