diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..40d0927 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "env": { + "browser": true, + "commonjs": true, + "es2021": true, + "node": true + }, + "extends": "plugin:react/recommended", + "overrides": [], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest" + }, + "plugins": ["react", "@typescript-eslint"], + "rules": {} +} diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..5ba764e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +pnpx lint-staged diff --git a/ci/deploy.js b/ci/deploy.js index a294825..340cf50 100755 --- a/ci/deploy.js +++ b/ci/deploy.js @@ -1,39 +1,43 @@ -const { promisify } = require('util') -const { publish } = require('gh-pages') -const ghpublish = promisify(publish) +const { promisify } = require("util"); +const { publish } = require("gh-pages"); +const ghpublish = promisify(publish); /* fix for "Unhandled promise rejections" */ -process.on('unhandledRejection', err => { throw err }) +process.on("unhandledRejection", (err) => { + throw err; +}); -const Args = process.argv.slice(2) -const USE_HTTPS = Args[0] && Args[0].toUpperCase() === 'HTTPS' +const Args = process.argv.slice(2); +const USE_HTTPS = Args[0] && Args[0].toUpperCase() === "HTTPS"; -const branch = 'gh-pages' -const org = 'waku-org' -const repo = 'js-waku-examples' +const branch = "gh-pages"; +const org = "waku-org"; +const repo = "js-waku-examples"; /* use SSH auth by default */ let repoUrl = USE_HTTPS ? `https://github.com/${org}/${repo}.git` - : `git@github.com:${org}/${repo}.git` + : `git@github.com:${org}/${repo}.git`; /* alternative auth using GitHub user and API token */ if (process.env.GH_USER != undefined) { - repoUrl = ( - 'https://' + process.env.GH_USER + - ':' + process.env.GH_TOKEN + - '@' + `github.com/${org}/${repo}.git` - ) + repoUrl = + "https://" + + process.env.GH_USER + + ":" + + process.env.GH_TOKEN + + "@" + + `github.com/${org}/${repo}.git`; } -const main = async (url, branch)=> { - console.log(`Pushing to: ${url}`) - console.log(`On branch: ${branch}`) - await ghpublish('build/docs', { +const main = async (url, branch) => { + console.log(`Pushing to: ${url}`); + console.log(`On branch: ${branch}`); + await ghpublish("build/docs", { repo: url, branch: branch, dotfiles: true, - silent: false - }) -} + silent: false, + }); +}; -main(repoUrl, branch) +main(repoUrl, branch); diff --git a/eth-pm/src/index.css b/eth-pm/src/index.css index ec2585e..4a1df4d 100644 --- a/eth-pm/src/index.css +++ b/eth-pm/src/index.css @@ -1,13 +1,13 @@ body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } diff --git a/light-js/index.html b/light-js/index.html index a12e010..923184f 100644 --- a/light-js/index.html +++ b/light-js/index.html @@ -1,121 +1,129 @@ - - -
- - + + + +