forked from ubiquity/pay.ubq.fi
-
Notifications
You must be signed in to change notification settings - Fork 0
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
60 changed files
with
1,349 additions
and
2,686 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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ name: Conventional Commits | |
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
conventional-commits: | ||
|
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,15 @@ | ||
name: Enforce kebab-case | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
check-filenames: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check For Non Kebab-Cased TypeScript Files | ||
run: .github/workflows/scripts/kebab-case.sh |
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,30 @@ | ||
#!/bin/bash | ||
non_compliant_files=() | ||
ignoreList=("^\.\/.git" "^\.\/\..*" "^\.\/[^\/]*$") | ||
ignoreList+=("^\.\/node_modules") | ||
while IFS= read -r line; do | ||
ignoreList+=(".*$line") | ||
done < .gitignore | ||
while read -r file; do | ||
basefile=$(basename "$file") | ||
ignoreFile=false | ||
for pattern in "${ignoreList[@]}"; do | ||
if [[ "$file" =~ $pattern ]]; then | ||
ignoreFile=true | ||
break | ||
fi | ||
done | ||
if $ignoreFile; then | ||
continue | ||
elif ! echo "$basefile" | grep -q -E "^([a-z0-9]+-)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$|^([a-z0-9]+_)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$"; then | ||
non_compliant_files+=("$file") | ||
echo "::warning file=$file::This file is not in kebab-case or snake_case" | ||
fi | ||
done < <(find . -type f -name '*.ts' -print | grep -E '/[a-z]+[a-zA-Z]*\.ts$') | ||
if [ ${#non_compliant_files[@]} -ne 0 ]; then | ||
echo "The following files are not in kebab-case or snake_case:" | ||
for file in "${non_compliant_files[@]}"; do | ||
echo " - $file" | ||
done | ||
exit 1 | ||
fi |
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,31 @@ | ||
#!/bin/bash | ||
non_compliant_files=() | ||
ignoreList=("^\.\/.git" "^\.\/\..*" "^\.\/[^\/]*$") | ||
while IFS= read -r line; do | ||
ignoreList+=(".*$line") | ||
done < .gitignore | ||
while read -r file; do | ||
basefile=$(basename "$file") | ||
ignoreFile=false | ||
for pattern in "${ignoreList[@]}"; do | ||
if [[ "$file" =~ $pattern ]]; then | ||
ignoreFile=true | ||
break | ||
fi | ||
done | ||
if $ignoreFile; then | ||
continue | ||
elif ! echo "$basefile" | grep -q -E "^([a-z0-9]+-)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$|^([a-z0-9]+_)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$"; then | ||
non_compliant_files+=("$file") | ||
echo "::warning file=$file::This file is not in kebab-case or snake_case" | ||
newfile=$(dirname "$file")/$(echo "$basefile" | sed -r 's/([a-z0-9])([A-Z])/\1-\2/g' | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g') | ||
mv "$file" "$newfile" | ||
fi | ||
done < <(find . -type f -name '*.ts' -print | grep -E '/[a-z]+[a-zA-Z]*\.ts$') | ||
if [ ${#non_compliant_files[@]} -ne 0 ]; then | ||
echo "The following files are not in kebab-case or snake_case:" | ||
for file in "${non_compliant_files[@]}"; do | ||
echo " - $file" | ||
done | ||
exit 1 | ||
fi |
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
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,17 +1,7 @@ | ||
export interface EthereumIsh { | ||
autoRefreshOnNetworkChange: boolean; | ||
chainId: string; | ||
isMetaMask?: boolean; | ||
isStatus?: boolean; | ||
networkVersion: string; | ||
selectedAddress: string; | ||
|
||
on(event: "close" | "accountsChanged" | "chainChanged" | "networkChanged", callback: (payload: unknown) => void): void; | ||
once(event: "close" | "accountsChanged" | "chainChanged" | "networkChanged", callback: (payload: unknown) => void): void; | ||
} | ||
import { Ethereum } from "ethereum-protocol"; | ||
|
||
declare global { | ||
interface Window { | ||
ethereum: EthereumIsh; | ||
ethereum: Ethereum; | ||
} | ||
} |
Oops, something went wrong.