Skip to content

Commit

Permalink
feat: add husky (#1542)
Browse files Browse the repository at this point in the history
* feat: add husky

* fix: prettier format
  • Loading branch information
kratico authored Sep 13, 2023
1 parent 32e8eaa commit 4741194
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 166 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
5 changes: 3 additions & 2 deletions .zombienet-tests/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ async function connect(nodeName, networkInfo, parachainId) {
let provider
if (parachainId) {
const relayProvider = new ScProvider(Sc, JSON.stringify(customChainSpec))
const customParachainSpec = require(networkInfo?.paras[parachainId]
?.chainSpecPath)
const customParachainSpec = require(
networkInfo?.paras[parachainId]?.chainSpecPath,
)
provider = new ScProvider(
Sc,
JSON.stringify(customParachainSpec),
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"dev:extension": "yarn workspace @substrate/extension run dev",
"deploy": "./deploy.sh",
"format": "prettier --write .",
"checkResolutions": "node ./.ensure-resolution.mjs"
"checkResolutions": "node ./.ensure-resolution.mjs",
"postinstall": "husky install"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,md}": "prettier --write"
},
"devDependencies": {
"@babel/core": "^7.22.5",
Expand Down Expand Up @@ -65,9 +69,11 @@
"eslint-plugin-import": "^2.28.1",
"file-loader": "^6.2.0",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"jsdom": "^19.0.0",
"lint-staged": "^14.0.1",
"nodemon": "^2.0.22",
"prettier": "^2.8.8",
"prettier": "^3.0.3",
"regenerator-runtime": "^0.13.11",
"rimraf": "^3.0.2",
"stream-browserify": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/burnr/src/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion projects/extension/public/options.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Substrate Connect Options</title>
Expand Down
2 changes: 1 addition & 1 deletion projects/extension/public/popup.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Substrate Connect</title>
Expand Down
3 changes: 2 additions & 1 deletion projects/extension/src/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@font-face {
font-family: "Web3-Regular";
src: url("./fonts/Web3-Regular.woff") format("woff"),
src:
url("./fonts/Web3-Regular.woff") format("woff"),
url("./fonts/Web3-Regular.woff2") format("woff2");
}

Expand Down
Loading

0 comments on commit 4741194

Please sign in to comment.