From 1a6cd13af422341f321e189d729ad542da4e2a16 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 10:50:07 -0700 Subject: [PATCH 1/6] fix yarn format --- packages/mobile-sdk-alpha/.eslintrc.cjs | 7 +++++++ packages/mobile-sdk-alpha/package.json | 1 + yarn.lock | 1 + 3 files changed, 9 insertions(+) diff --git a/packages/mobile-sdk-alpha/.eslintrc.cjs b/packages/mobile-sdk-alpha/.eslintrc.cjs index 9b0916379..5f00f137e 100644 --- a/packages/mobile-sdk-alpha/.eslintrc.cjs +++ b/packages/mobile-sdk-alpha/.eslintrc.cjs @@ -24,8 +24,13 @@ module.exports = { typescript: { alwaysTryTypes: true, project: './tsconfig.json', + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], }, }, + 'import/ignore': ['react-native'], }, rules: { 'import/order': 'off', @@ -54,6 +59,8 @@ module.exports = { 'import/newline-after-import': 'error', 'import/no-duplicates': 'error', 'import/export': 'off', + 'import/no-unresolved': 'off', // Temporarily disable to fix workspace import issues + 'import/namespace': 'off', // Disable namespace validation that's causing file resolution errors '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-require-imports': 'error', '@typescript-eslint/no-empty-object-type': 'error', diff --git a/packages/mobile-sdk-alpha/package.json b/packages/mobile-sdk-alpha/package.json index ac7f63657..083b7aa46 100644 --- a/packages/mobile-sdk-alpha/package.json +++ b/packages/mobile-sdk-alpha/package.json @@ -74,6 +74,7 @@ "@typescript-eslint/parser": "^8.0.0", "eslint": "^8.57.0", "eslint-config-prettier": "^10.1.8", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.31.0", "eslint-plugin-prettier": "^5.5.4", "eslint-plugin-simple-import-sort": "^12.1.1", diff --git a/yarn.lock b/yarn.lock index 22a1a854a..c0825110a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4925,6 +4925,7 @@ __metadata: "@typescript-eslint/parser": "npm:^8.0.0" eslint: "npm:^8.57.0" eslint-config-prettier: "npm:^10.1.8" + eslint-import-resolver-typescript: "npm:^4.4.4" eslint-plugin-import: "npm:^2.31.0" eslint-plugin-prettier: "npm:^5.5.4" eslint-plugin-simple-import-sort: "npm:^12.1.1" From 3ca1f70078bf348304a598c82807c4377fd5b012 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 11:26:40 -0700 Subject: [PATCH 2/6] yarn format --- .github/workflows/mobile-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mobile-deploy.yml b/.github/workflows/mobile-deploy.yml index c829df8db..dca120497 100644 --- a/.github/workflows/mobile-deploy.yml +++ b/.github/workflows/mobile-deploy.yml @@ -608,7 +608,7 @@ jobs: with: fetch-depth: 0 ref: staging - - uses: 'google-github-actions/auth@v2' + - uses: "google-github-actions/auth@v2" with: project_id: "plucky-tempo-454713-r0" workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos" @@ -832,7 +832,7 @@ jobs: done - name: Set Gradle JVM options - if: inputs.platform != 'ios' # Apply to CI builds (not just ACT) + if: inputs.platform != 'ios' # Apply to CI builds (not just ACT) run: | echo "org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8" >> ${{ env.APP_PATH }}/android/gradle.properties From 87e49b82b718b6c7786a26be4345a21a62f8719a Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 11:35:21 -0700 Subject: [PATCH 3/6] fix lint --- package.json | 4 ++-- scripts/check-license-headers.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7a756f1eb..59a825c43 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "gitleaks": "gitleaks protect --staged --redact --config=.gitleaks.toml", "postinstall": "node scripts/run-patch-package.cjs", "lint": "yarn lint:headers && yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run lint", - "lint:headers": "node scripts/check-duplicate-headers.cjs app && node scripts/check-license-headers.mjs app --check && node scripts/check-duplicate-headers.cjs packages/mobile-sdk-alpha && node scripts/check-license-headers.mjs packages/mobile-sdk-alpha --check", - "lint:headers:fix": "node scripts/check-duplicate-headers.cjs app && node scripts/check-license-headers.mjs app --fix && node scripts/check-duplicate-headers.cjs packages/mobile-sdk-alpha && node scripts/check-license-headers.mjs packages/mobile-sdk-alpha --fix", + "lint:headers": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --check", + "lint:headers:fix": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --fix", "prepare": "husky", "sort-package-jsons": "find . -name 'package.json' -not -path './node_modules/*' -not -path './*/node_modules/*' | xargs npx sort-package-json", "test": "yarn workspaces foreach --parallel -i --all run test", diff --git a/scripts/check-license-headers.mjs b/scripts/check-license-headers.mjs index d2b72ab18..72a3701a9 100644 --- a/scripts/check-license-headers.mjs +++ b/scripts/check-license-headers.mjs @@ -206,7 +206,7 @@ function main() { if (isCheck) { // Show which directories require headers const requiredDirs = ['app/', 'packages/mobile-sdk-alpha/']; - console.log(`📋 License headers required in: ${requiredDirs.join(', ')}\n`); + console.log(`📋 License headers required in: ${requiredDirs.join(', ')}`); if (issues.length === 0) { console.log('✅ All license headers are properly formatted'); From 5f59f29aacf1fa5f95342b6297a810c027d0b731 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 11:58:28 -0700 Subject: [PATCH 4/6] undo temporary disabling --- packages/mobile-sdk-alpha/.eslintrc.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mobile-sdk-alpha/.eslintrc.cjs b/packages/mobile-sdk-alpha/.eslintrc.cjs index 5f00f137e..5f8f75e0c 100644 --- a/packages/mobile-sdk-alpha/.eslintrc.cjs +++ b/packages/mobile-sdk-alpha/.eslintrc.cjs @@ -59,8 +59,8 @@ module.exports = { 'import/newline-after-import': 'error', 'import/no-duplicates': 'error', 'import/export': 'off', - 'import/no-unresolved': 'off', // Temporarily disable to fix workspace import issues - 'import/namespace': 'off', // Disable namespace validation that's causing file resolution errors + 'import/no-unresolved': ['error', { caseSensitive: true }], + 'import/namespace': 'error', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-require-imports': 'error', '@typescript-eslint/no-empty-object-type': 'error', From 0976a4855a9376470d3ee489e16072f421f6b505 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 19:02:13 -0700 Subject: [PATCH 5/6] pipeline fixes --- .nvmrc | 2 +- .prettierignore | 12 ++++++++++++ .watchmanconfig | 1 - app/package.json | 2 +- contracts/package.json | 5 +++-- package.json | 2 +- packages/mobile-sdk-alpha/package.json | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .prettierignore diff --git a/.nvmrc b/.nvmrc index 2bd5a0a98..9e67b5ff7 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -22 +22; diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..4252a025f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,12 @@ +# Root .prettierignore +**/node_modules/** +**/.yarn/** +**/dist/** +**/build/** +**/coverage/** +**/Pods/** +app/vendor/** +circuits/build/** +contracts/artifacts/** +contracts/cache/** +contracts/typechain-types/** diff --git a/.watchmanconfig b/.watchmanconfig index 0db3279e4..2c63c0851 100644 --- a/.watchmanconfig +++ b/.watchmanconfig @@ -1,3 +1,2 @@ { - } diff --git a/app/package.json b/app/package.json index ae1220292..59ca4ac44 100644 --- a/app/package.json +++ b/app/package.json @@ -43,7 +43,7 @@ "mobile-local-deploy": "FORCE_UPLOAD_LOCAL_DEV=true node scripts/mobile-deploy-confirm.cjs both", "mobile-local-deploy:android": "FORCE_UPLOAD_LOCAL_DEV=true node scripts/mobile-deploy-confirm.cjs android", "mobile-local-deploy:ios": "FORCE_UPLOAD_LOCAL_DEV=true node scripts/mobile-deploy-confirm.cjs ios", - "nice": "yarn build:deps && yarn imports:fix && yarn lint:fix && yarn fmt:fix", + "nice": "sh -c 'if [ -z \"$SKIP_BUILD_DEPS\" ]; then yarn build:deps; fi; yarn imports:fix && yarn lint:fix && yarn fmt:fix'", "reinstall": "yarn clean && yarn install && yarn install-app", "release": "./scripts/release.sh", "release:major": "./scripts/release.sh major", diff --git a/contracts/package.json b/contracts/package.json index 21a177f25..d4474fbca 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -33,8 +33,9 @@ "deploy:verifiers:all": "npx dotenv-cli -- bash -c 'yarn hardhat ignition deploy ignition/modules/verifiers/deployAllVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "export-prod": "bash ./scripts/prod.sh", "find:error": "npx tsx scripts/findErrorSelectors.ts", - "prettier:check": "prettier --list-different '**/*.{json,md,yml,sol,ts}'", - "prettier:write": "prettier --write '**/*.{json,md,yml,sol,ts}'", + "format": "yarn prettier:write", + "prettier:check": "prettier --plugin-search-dir . --list-different '**/*.{json,md,yml,sol,ts}'", + "prettier:write": "prettier --plugin-search-dir . --write '**/*.{json,md,yml,sol,ts}'", "publish": "npm publish --access public", "set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-alfajores} npx tsx scripts/setHubV2.ts'", "set:registry": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx tsx scripts/setRegistry.ts'", diff --git a/package.json b/package.json index 59a825c43..918fa37ed 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run build", "check:versions": "node scripts/check-package-versions.mjs", - "format": "yarn format:root && yarn format:github && yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run format", + "format": "SKIP_BUILD_DEPS=1 yarn format:root && yarn format:github && SKIP_BUILD_DEPS=1 yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run format", "format:github": "prettier --parser yaml --write .github/**/*.yml --single-quote false", "format:root": "prettier --parser markdown --write *.md scripts/**/*.md && prettier --parser yaml --write .*.{yml,yaml} --single-quote false && prettier --write scripts/**/*.{js,mjs,ts} && prettier --parser json --write scripts/**/*.json", "gitleaks": "gitleaks protect --staged --redact --config=.gitleaks.toml", diff --git a/packages/mobile-sdk-alpha/package.json b/packages/mobile-sdk-alpha/package.json index 083b7aa46..e35f0a706 100644 --- a/packages/mobile-sdk-alpha/package.json +++ b/packages/mobile-sdk-alpha/package.json @@ -49,7 +49,7 @@ "demo:test": "yarn workspace demo-app test", "fmt": "prettier --check .", "fmt:fix": "prettier --write .", - "format": "yarn nice", + "format": "sh -c 'if [ -z \"$SKIP_BUILD_DEPS\" ]; then yarn nice; else yarn fmt:fix; fi'", "lint": "eslint .", "lint:fix": "eslint --fix .", "nice": "yarn lint:fix && yarn fmt:fix", From 06d6738559982424663e1e4b524cb4f6cec52ae8 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Sep 2025 19:10:36 -0700 Subject: [PATCH 6/6] revert nvmrc change --- .nvmrc | 2 +- .prettierignore | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index 9e67b5ff7..2bd5a0a98 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -22; +22 diff --git a/.prettierignore b/.prettierignore index 4252a025f..95b80feb0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,5 @@ circuits/build/** contracts/artifacts/** contracts/cache/** contracts/typechain-types/** +.nvmrc +.watchmanconfig