Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .commitlintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

7 changes: 0 additions & 7 deletions .eslintrc.json

This file was deleted.

17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
# A freshly published (possibly compromised) release is not proposed right away.
cooldown:
default-days: 7
groups:
actions:
patterns:
- "*"
# Passes the PR title check and does not cut a release.
commit-message:
prefix: ci
40 changes: 40 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Checks

on:
workflow_call:

permissions: {}

env:
HUSKY: 0
CI: true

jobs:
checks:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- uses: pnpm/setup@731dfb6463bbd11c11fd0ee11fe00ed0e36d48a1 # v3.2.0
with:
cache: true
install: false

# Before install, so a lockfile with a HIGH advisory is never installed.
- name: Audit lockfile
run: pnpm audit --audit-level high

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Perform checks
run: |
pnpm typecheck:ci
pnpm check:ci
15 changes: 12 additions & 3 deletions .github/workflows/lint_pr.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: "Lint PR"

on:
pull_request_target:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pull-requests: read # read the PR title
steps:
- uses: amannn/action-semantic-pull-request@v6
- uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 # v6.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
36 changes: 22 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,32 @@ on:
pull_request:
types: [opened, reopened, synchronize]

env:
HUSKY: 0
CI: true
permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
checks:
runs-on: ubuntu-latest
permissions:
contents: read
uses: $/.github/workflows/checks.yml

zizmor:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v7

- uses: pnpm/setup@v3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
cache: true
require-lockfile: true
persist-credentials: false

- name: Perform checks
run: |
pnpm typecheck:ci
pnpm lint:ci
pnpm prettier:ci
# No GitHub Advanced Security here, so findings go to annotations, not code scanning.
- uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
# Pinned, so a new audit cannot start failing releases with nothing changed here.
version: "1.32.0"
advanced-security: false
annotations: true
61 changes: 46 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,80 @@ on:
- "main"
- "next"

permissions: {}

# An interrupted semantic-release leaves a tag with no release behind it.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

env:
HUSKY: 0
CI: true

jobs:
verify:
permissions:
contents: read
uses: $/.github/workflows/checks.yml

zizmor:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

# No GitHub Advanced Security here, so findings go to annotations, not code scanning.
- uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
# Pinned, so a new audit cannot start failing releases with nothing changed here.
version: "1.32.0"
advanced-security: false
annotations: true

release:
needs: [verify, zizmor]
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
contents: write # publish GitHub release
issues: write # semantic-release comments
pull-requests: write # semantic-release comments
id-token: write # OIDC for npm trusted publishing + provenance
deployments: write # cloudflare/wrangler-action
contents: write # create tag and GitHub release
id-token: write # npm trusted publishing and provenance
deployments: write # GitHub deployment created by cloudflare/wrangler-action

steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: pnpm/setup@v3
- uses: pnpm/setup@731dfb6463bbd11c11fd0ee11fe00ed0e36d48a1 # v3.2.0
with:
cache: true
require-lockfile: true

# No lint or prettier here since they were supposed to run on PR action
- name: Build
run: pnpm build

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
uses: cycjimmy/semantic-release-action@ad51787758d9654d5a75150a89a6fa9b3ccef95e # v8.1.4
with:
extra_plugins: "@semantic-release/exec"
extra_plugins: "@semantic-release/exec@7.1.0"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}

# wrangler comes from the lockfile (devDependencies), so the action installs nothing.
- name: Publish to Cloudflare Pages
uses: cloudflare/wrangler-action@v4
uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT }}
command: pages deploy public --project-name=${{ secrets.CF_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
gitHubToken: ${{ github.token }}

- uses: mfinelli/cloudflare-pages-cleanup@v1
- uses: mfinelli/cloudflare-pages-cleanup@2e6030667fd700c74509c10050adb0df151f0556 # v1.1.0
with:
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT }}
cloudflare_api_token: ${{ secrets.CLOUDFLARE_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@

*.log

.eslintcache
.eslint.local.json
.vscode/mise-tools/
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

8 changes: 6 additions & 2 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"branches": ["main"],
"branches": [
{ "name": "main" },
{ "name": "next", "channel": "next", "prerelease": "next" }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand All @@ -19,7 +22,8 @@
"@semantic-release/github",
{
"successComment": false,
"failTitle": false
"failTitle": false,
"releasedLabels": false
}
]
]
Expand Down
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"nomicfoundation.hardhat-solidity",
"dbaeumer.vscode-eslint"
]
"recommendations": ["biomejs.biome"]
}
32 changes: 27 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
{
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"biome.enabled": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
"source.fixAll.biome": "explicit",
"source.fixAll.eslint": "never",
"source.organizeImports.biome": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"eslint.validate": ["javascript", "typescript"],
"eslint.enable": false,
"files.eol": "\n",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"search.exclude": {
"**/dist": true,
"**/node_modules": true
}
}
32 changes: 32 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://biomejs.dev/schemas/2.6.7/schema.json",
"extends": ["@gearbox-protocol/biome-config"],
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"includes": ["**", "!node_modules", "!dist", "!public"],
"ignoreUnknown": true
},
"linter": {
"rules": {
"a11y": {
"noSvgWithoutTitle": "off"
}
}
},
"overrides": [
{
"includes": ["src/icons/**", "src/social/**"],
"linter": {
"rules": {
"a11y": {
"useKeyWithClickEvents": "off"
}
}
}
}
]
}
Loading
Loading