-
Notifications
You must be signed in to change notification settings - Fork 145
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
41 changed files
with
1,106 additions
and
1,335 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 +1,5 @@ | ||
use nix | ||
#!/usr/bin/env bash | ||
|
||
export GIT_LFS_SKIP_SMUDGE=1 | ||
./pin.sh | ||
use flake o1js#default |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -310,7 +310,7 @@ jobs: | |
strategy: upgrade | ||
env: | ||
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Configure Git | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
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,49 @@ | ||
name: Lint and Format Check | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
lint-and-format: | ||
if: github.event.pull_request.labels.*.name != 'skip-lint' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: npm | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Get Changed Files (Compare with Main) | ||
id: get_changed_files | ||
run: | | ||
git fetch origin main --depth=1 | ||
CHANGED_FILES=$(git diff --name-only origin/main | grep -E '\.(ts|js)$' || true) | ||
if [ -n "$CHANGED_FILES" ]; then | ||
echo "Files changed:" | ||
echo "$CHANGED_FILES" | ||
echo "$CHANGED_FILES" > changed_files.txt | ||
echo "files_changed=true" >> $GITHUB_OUTPUT | ||
else | ||
echo "No relevant files changed." | ||
echo "files_changed=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Run Prettier Check | ||
if: steps.get_changed_files.outputs.files_changed == 'true' | ||
run: xargs npm run format:check < changed_files.txt | ||
|
||
- name: Run Oxlint | ||
if: steps.get_changed_files.outputs.files_changed == 'true' | ||
run: xargs npm run lint:strict < changed_files.txt |
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,13 @@ | ||
#!/bin/sh | ||
|
||
# Check if the developer has enabled pre-commit hooks | ||
if ! git config --get husky.optin > /dev/null; then | ||
echo "⚠️ Husky pre-commit hook skipped. Enable it with: git config husky.optin true" | ||
exit 0 | ||
fi | ||
|
||
echo "⚠️ Husky pre-commit hook enabled. Disable it with: git config --unset husky.optin" | ||
|
||
# Filter for diffed (excluding deleted) js and ts files, and format them according to oxlint and prettier rules | ||
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run lint:fix | ||
git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run format |
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,23 @@ | ||
{ | ||
"extends": "oxlint/recommended", | ||
"rules": { | ||
"erasing-op": "off", | ||
"no-new-array": "off", | ||
"no-this-alias": "off", | ||
"no-unsafe-finally": "off", | ||
"no-unused-labels": "off", | ||
"no-useless-escape": "off", | ||
"no-wrapper-object-types": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"_build/", | ||
".github/", | ||
"benchmark/", | ||
"dist/", | ||
"node_modules/", | ||
"o1js-reference/", | ||
"src/bindings/", | ||
"src/mina/", | ||
"**/*.d.ts" | ||
] | ||
} |
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,4 +1,9 @@ | ||
src/bindings/compiled/web_bindings/**/plonk_wasm* | ||
src/bindings/compiled/web_bindings/**/*.bc.js | ||
src/bindings/compiled/node_bindings/* | ||
dist/**/* | ||
_build/ | ||
.github/ | ||
benchmark/ | ||
dist/ | ||
node_modules/ | ||
o1js-reference/ | ||
src/bindings/ | ||
src/mina/ | ||
**/*.d.ts |
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 |
---|---|---|
|
@@ -3,4 +3,5 @@ module.exports = { | |
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 100, | ||
}; |
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
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 +1 @@ | ||
sha256-hFxCHth04vW95DJCTLHKV2N0v9NNQG57DpucsAq3yvs= | ||
sha256-qu21Wkmk3fNZOOb66vAX3WEsm1aipQNzNoKQBPuIiZ4= |
Oops, something went wrong.