Răsfoiți Sursa

refactor: use yarn dlx instead of npx in husky hooks

chore: make package private explicitly
refactor: reorder fields alphabetically in package.json
Paul Razvan Berg 4 ani în urmă
părinte
comite
6e310030e3
5 a modificat fișierele cu 15 adăugiri și 13 ștergeri
  1. 1 0
      .husky/.gitignore
  2. 1 1
      .husky/commit-msg
  3. 1 1
      .husky/pre-commit
  4. 10 9
      package.json
  5. 2 2
      yarn.lock

+ 1 - 0
.husky/.gitignore

@@ -1 +1,2 @@
+# folders
 _

+ 1 - 1
.husky/commit-msg

@@ -1,4 +1,4 @@
 #!/bin/sh
 . "$(dirname "$0")/_/husky.sh"
 
-npx commitlint -e
+yarn dlx commitlint -e

+ 1 - 1
.husky/pre-commit

@@ -1,4 +1,4 @@
 #!/bin/sh
 . "$(dirname "$0")/_/husky.sh"
 
-npx lint-staged
+yarn dlx lint-staged

+ 10 - 9
package.json

@@ -38,6 +38,7 @@
     "hardhat": "^2.3.0",
     "hardhat-gas-reporter": "^1.0.4",
     "husky": "^6.0.0",
+    "lint-staged": "^11.0.0",
     "mocha": "^8.4.0",
     "prettier": "^2.3.0",
     "prettier-plugin-solidity": "^1.0.0-beta.10",
@@ -48,8 +49,7 @@
     "ts-generator": "^0.1.1",
     "ts-node": "^9.1.1",
     "typechain": "^5.0.0",
-    "typescript": "^4.2.4",
-    "lint-staged": "^11.0.0"
+    "typescript": "^4.2.4"
   },
   "files": [
     "/contracts"
@@ -62,16 +62,16 @@
     "solidity"
   ],
   "license": "WTFPL",
-  "publishConfig": {
-    "access": "public"
-  },
   "lint-staged": {
     "*.{js,json,md,sol,ts}": [
-      "prettier --config .prettierrc --write"
+      "prettier --config ./.prettierrc --write"
     ]
   },
+  "private": true,
+  "publishConfig": {
+    "access": "public"
+  },
   "scripts": {
-    "postinstall": "husky install",
     "clean": "hardhat clean",
     "commit": "git-cz",
     "compile": "hardhat compile",
@@ -81,8 +81,9 @@
     "lint": "yarn run lint:sol && yarn run lint:ts && yarn run prettier:check",
     "lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"",
     "lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .",
-    "prettier": "prettier --config .prettierrc --write \"**/*.{js,json,md,sol,ts}\"",
-    "prettier:check": "prettier --check --config .prettierrc \"**/*.{js,json,md,sol,ts}\"",
+    "postinstall": "husky install",
+    "prettier": "prettier --config ./.prettierrc --write \"**/*.{js,json,md,sol,ts}\"",
+    "prettier:check": "prettier --check --config ./.prettierrc \"**/*.{js,json,md,sol,ts}\"",
     "test": "hardhat test",
     "typechain": "hardhat typechain"
   }

+ 2 - 2
yarn.lock

@@ -1181,7 +1181,7 @@ __metadata:
     fs-extra: ^10.0.0
     hardhat: ^2.3.0
     hardhat-gas-reporter: ^1.0.4
-    husky: 6.0.0
+    husky: ^6.0.0
     lint-staged: ^11.0.0
     mocha: ^8.4.0
     prettier: ^2.3.0
@@ -7663,7 +7663,7 @@ fsevents@~2.3.1:
   languageName: node
   linkType: hard
 
-"husky@npm:6.0.0":
+"husky@npm:^6.0.0":
   version: 6.0.0
   resolution: "husky@npm:6.0.0"
   bin: