-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
5,738 additions
and
1,682 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,41 @@ | ||
{ | ||
"words": ["WXDAI"] | ||
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", | ||
"version": "0.2", | ||
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "/lib"], | ||
"useGitignore": true, | ||
"language": "en", | ||
"words": [ | ||
"solmate", | ||
"binkey", | ||
"binsec", | ||
"cirip", | ||
"dataurl", | ||
"devpool", | ||
"ethersproject", | ||
"fract", | ||
"gnosisscan", | ||
"godb", | ||
"greyscale", | ||
"IERC", | ||
"keccak", | ||
"keypair", | ||
"libsodium", | ||
"Numberish", | ||
"outdir", | ||
"Rpcs", | ||
"scalarmult", | ||
"servedir", | ||
"sonarjs", | ||
"typebox", | ||
"TYPEHASH", | ||
"ubiquibot", | ||
"UBIQUIBOT", | ||
"URLSAFE", | ||
"WXDAI", | ||
"XDAI", | ||
"xmark" | ||
], | ||
"dictionaries": ["typescript", "node", "software-terms", "html"], | ||
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"], | ||
"ignoreRegExpList": ["[0-9a-fA-F]{6}"] | ||
} |
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,108 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": ["./tsconfig.json"] | ||
}, | ||
"plugins": ["@typescript-eslint", "sonarjs"], | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:sonarjs/recommended"], | ||
"ignorePatterns": ["**/*.js"], | ||
"rules": { | ||
"prefer-arrow-callback": [ | ||
"warn", | ||
{ | ||
"allowNamedFunctions": true | ||
} | ||
], | ||
"func-style": [ | ||
"warn", | ||
"declaration", | ||
{ | ||
"allowArrowFunctions": false | ||
} | ||
], | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"constructor-super": "error", | ||
"no-invalid-this": "off", | ||
"@typescript-eslint/no-invalid-this": ["error"], | ||
"no-restricted-syntax": ["error", "ForInStatement"], | ||
"use-isnan": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "after-used", | ||
"ignoreRestSiblings": true, | ||
"vars": "all", | ||
"varsIgnorePattern": "^_", | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/restrict-plus-operands": "error", | ||
"sonarjs/no-all-duplicated-branches": "error", | ||
"sonarjs/no-collection-size-mischeck": "error", | ||
"sonarjs/no-duplicated-branches": "error", | ||
"sonarjs/no-element-overwrite": "error", | ||
"sonarjs/no-identical-conditions": "error", | ||
"sonarjs/no-identical-expressions": "error", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "interface", | ||
"format": ["PascalCase"], | ||
"custom": { | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
} | ||
}, | ||
{ | ||
"selector": "memberLike", | ||
"modifiers": ["private"], | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "require" | ||
}, | ||
{ | ||
"selector": "typeLike", | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": "typeParameter", | ||
"format": ["PascalCase"], | ||
"prefix": ["T"] | ||
}, | ||
{ | ||
"selector": "variable", | ||
"format": ["camelCase", "UPPER_CASE"], | ||
"leadingUnderscore": "allow", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "variable", | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "allow", | ||
"trailingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "variable", | ||
"modifiers": ["destructured"], | ||
"format": null | ||
}, | ||
{ | ||
"selector": "variable", | ||
"types": ["boolean"], | ||
"format": ["PascalCase"], | ||
"prefix": ["is", "should", "has", "can", "did", "will", "does"] | ||
}, | ||
{ | ||
"selector": "variableLike", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": ["function", "variable"], | ||
"format": ["camelCase"] | ||
} | ||
] | ||
} | ||
} |
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,6 @@ | ||
Resolves # | ||
|
||
<!-- | ||
- You must link the issue number e.g. "Resolves #1234" | ||
- Please do not replace the keyword "Resolves" https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword | ||
--> |
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 |
---|---|---|
@@ -1,49 +1,54 @@ | ||
name: Build | ||
name: Build & Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
|
||
- name: Yarn Install | ||
run: yarn install | ||
node-version: 20.10.0 | ||
|
||
- name: Build | ||
run: yarn utils:build | ||
|
||
- name: Add commit SHA file to build folder | ||
run: echo -n $(echo "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" | cut -c1-7) > static/commit.txt | ||
|
||
- name: Prepare Deployment Artifact | ||
env: | ||
EVENT_NAME: ${{github.event_name}} | ||
PR_NUMBER: ${{ github.event.number }} | ||
SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA" | ||
mkdir -p ./pr | ||
echo "event_name=$EVENT_NAME,pr_number=$PR_NUMBER,sha=$SHA," > ./pr/pr_number | ||
cd ./static && zip -r ../pr/pull-request.zip ./* | ||
yarn | ||
yarn build | ||
echo -n $(echo "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}" | cut -c1-7) > static/commit.txt | ||
- uses: actions/upload-artifact@v3 | ||
- name: Check Cloudflare API Token | ||
id: check_token | ||
run: | | ||
if [[ -z "${{ secrets.CLOUDFLARE_API_TOKEN }}" ]]; then | ||
echo "Cloudflare API token is not set. Skipping deployment." | ||
echo "skip=true" >> $GITHUB_ENV | ||
else | ||
echo "skip=false" >> $GITHUB_ENV | ||
fi | ||
shell: bash | ||
|
||
- name: Deploy to Cloudflare | ||
if: env.skip != 'true' | ||
uses: ubiquity/cloudflare-deploy-action@main | ||
with: | ||
name: pr | ||
path: pr/ | ||
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
repository: ${{ github.repository }} | ||
production_branch: ${{ github.event.repository.default_branch }} | ||
output_directory: "static" | ||
current_branch: ${{ github.ref_name }} | ||
pull_request_number: ${{ github.event.pull_request.number }} | ||
commit_sha: ${{ github.sha }} | ||
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
app_id: ${{ secrets.APP_ID }} | ||
app_installation_id: ${{ secrets.APP_INSTALLATION_ID }} | ||
# Add any environment variables you need to pass along here | ||
# SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
# SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} |
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,12 @@ | ||
name: Conventional Commits | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
conventional-commits: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ubiquity/action-conventional-commits@master |
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,24 @@ | ||
name: Spell Check | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
spellcheck: | ||
name: Check for spelling errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
|
||
- name: Install cspell | ||
run: yarn add cspell | ||
|
||
- name: Run cspell | ||
run: yarn format:cspell |
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 |
---|---|---|
|
@@ -5,3 +5,9 @@ out | |
.yarn | ||
.DS_Store | ||
commit.txt | ||
# macOS | ||
# node | ||
# yarn2 | ||
.pnp.cjs | ||
.pnp.loader.mjs | ||
static/dist |
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
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit "$1" |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint-staged |
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,2 @@ | ||
node_modules | ||
/lib |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
{ | ||
"useTabs": false, | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"arrowParens": "avoid", | ||
"singleQuote": false, | ||
"printWidth": 160, | ||
"proseWrap": "preserve", | ||
"tabWidth": 2, | ||
"htmlWhitespaceSensitivity": "strict", | ||
"singleQuote": false | ||
"plugins": [], | ||
"useTabs": false | ||
} |
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
Oops, something went wrong.
785d151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
785d151