From 776d5b9aace4e1572259e18b12f8d07c48231479 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 14:07:09 +0100 Subject: [PATCH 1/9] chore: add prettierignore --- .prettierignore | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..3e8eee55a6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,20 @@ +# General Ignores +.gitignore +.eslintcache +.eslintignore +node_modules + +# Artifacts +.next +out + +# IDE +.vscode + +# Specific Ignores +*.svg +*.ico +*.json +*.md +*.log +*.lock From 23cd74bc6451879e79647b75f32b649ae8c56301 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 14:16:02 +0100 Subject: [PATCH 2/9] chore: add prettier commands --- .prettierignore | 8 +++++--- package.json | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.prettierignore b/.prettierignore index 3e8eee55a6..06fd49d9bb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,11 +2,13 @@ .gitignore .eslintcache .eslintignore -node_modules +node_modules/ +public/ # Artifacts -.next -out +.next/ +out/ +src/locales/ # IDE .vscode diff --git a/package.json b/package.json index 4b55278633..cb6bfe5505 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "start": "next start", "lint": "next lint", "lint:fix": "next lint --fix", + "lint:formatting": "prettier src pages scripts cypress . --check", + "lint:formatting:fix": "prettier src pages scripts cypress . --write", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest", "i18n:extract": "NODE_ENV=development lingui extract --clean --overwrite --locale en", "i18n:compile": "lingui compile", From 78ee074e21ce9c08d4056e24b69d159f12b276f4 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 14:18:19 +0100 Subject: [PATCH 3/9] chore: add combined linting commands --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cb6bfe5505..576f422061 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,12 @@ "serve:static": "npx serve out", "export": "next export", "start": "next start", - "lint": "next lint", - "lint:fix": "next lint --fix", + "lint:code": "next lint", + "lint:code:fix": "next lint --fix", "lint:formatting": "prettier src pages scripts cypress . --check", "lint:formatting:fix": "prettier src pages scripts cypress . --write", + "lint": "yarn lint:code && yarn lint:formatting", + "lint:fix": "yarn lint:code:fix && yarn lint:formatting:fix", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest", "i18n:extract": "NODE_ENV=development lingui extract --clean --overwrite --locale en", "i18n:compile": "lingui compile", From 513b70bc423bbb33c69a6345dcc5678849adec4e Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 14:18:43 +0100 Subject: [PATCH 4/9] chore: run yarn lint:fix --- .github/actions/analyze-comment/action.yml | 4 +-- .github/actions/cypress/action.yml | 2 +- .../actions/fork-result-comment/action.yml | 4 +-- .github/actions/private-ipfs-pin/action.yml | 4 +-- .github/actions/upload-artifacts/action.yml | 6 ++-- .github/workflows/build-fork.yml | 4 +-- .github/workflows/i18n-check.yml | 4 +-- .github/workflows/test-deploy-fork.yml | 29 +++++++++---------- .github/workflows/update-prod-staging.yml | 2 +- 9 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/actions/analyze-comment/action.yml b/.github/actions/analyze-comment/action.yml index 29c162660c..3f30c3f60c 100644 --- a/.github/actions/analyze-comment/action.yml +++ b/.github/actions/analyze-comment/action.yml @@ -4,9 +4,9 @@ inputs: PULL_REQUEST_NUMBER: description: Pull request id in case it does not exist in the context by default required: false - default: "0" + default: '0' runs: - using: "composite" + using: 'composite' steps: - name: Download PR bundle stats if: github.event.workflow_run.id diff --git a/.github/actions/cypress/action.yml b/.github/actions/cypress/action.yml index 8786e2d25b..fd296972d9 100644 --- a/.github/actions/cypress/action.yml +++ b/.github/actions/cypress/action.yml @@ -14,7 +14,7 @@ inputs: description: yarn command to run test required: true runs: - using: "composite" + using: 'composite' steps: - uses: actions/setup-node@2fddd8803e2f5c9604345a0b591c3020ee971a93 # v3.4.1 with: diff --git a/.github/actions/fork-result-comment/action.yml b/.github/actions/fork-result-comment/action.yml index ff473c882d..5f46abeacd 100644 --- a/.github/actions/fork-result-comment/action.yml +++ b/.github/actions/fork-result-comment/action.yml @@ -4,12 +4,12 @@ inputs: PULL_REQUEST_NUMBER: description: Pull request id required: false - default: "0" + default: '0' COMMENT_BODY: description: Text of the comment required: true runs: - using: "composite" + using: 'composite' steps: - name: Find Comment uses: peter-evans/find-comment@1769778a0c5bd330272d749d12c036d65e70d39d # v2.0.0 diff --git a/.github/actions/private-ipfs-pin/action.yml b/.github/actions/private-ipfs-pin/action.yml index 931cba11e2..d30797f009 100644 --- a/.github/actions/private-ipfs-pin/action.yml +++ b/.github/actions/private-ipfs-pin/action.yml @@ -2,7 +2,7 @@ name: Pin to private cluster description: Upload build to ipfs nodes runnning in GKE inputs: DOMAIN: - description: Domain to unpin + description: Domain to unpin required: true GCP_SA_KEY: description: '' @@ -16,7 +16,7 @@ inputs: BUILD_PATH: description: path to the build directory required: true - PINATA_HASH: + PINATA_HASH: description: '' required: true runs: diff --git a/.github/actions/upload-artifacts/action.yml b/.github/actions/upload-artifacts/action.yml index 966cb7bbd9..62b3d13f0b 100644 --- a/.github/actions/upload-artifacts/action.yml +++ b/.github/actions/upload-artifacts/action.yml @@ -8,13 +8,13 @@ inputs: PR_INFO: description: shoud this artifact be uploaded required: false - default: "true" + default: 'true' NEXTJS_BUILD: description: shoud this artifact be uploaded required: false - default: "true" + default: 'true' runs: - using: "composite" + using: 'composite' steps: - name: Save PR number if: github.event.number && inputs.PR_INFO == 'true' diff --git a/.github/workflows/build-fork.yml b/.github/workflows/build-fork.yml index 4a8e2132a1..0f8ee0b92b 100644 --- a/.github/workflows/build-fork.yml +++ b/.github/workflows/build-fork.yml @@ -6,7 +6,7 @@ concurrency: on: pull_request: - branches: ["main"] + branches: ['main'] jobs: build: @@ -21,7 +21,7 @@ jobs: - name: Build App uses: ./.github/actions/build with: - NEXT_PUBLIC_ENV: "prod" + NEXT_PUBLIC_ENV: 'prod' - name: Upload artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/workflows/i18n-check.yml b/.github/workflows/i18n-check.yml index 406c2e9b9f..01e55df016 100644 --- a/.github/workflows/i18n-check.yml +++ b/.github/workflows/i18n-check.yml @@ -6,9 +6,9 @@ concurrency: on: pull_request: - branches: ["main"] + branches: ['main'] push: - branches: ["main"] + branches: ['main'] jobs: i18n-check: diff --git a/.github/workflows/test-deploy-fork.yml b/.github/workflows/test-deploy-fork.yml index 25fd9cc87b..8e82052416 100644 --- a/.github/workflows/test-deploy-fork.yml +++ b/.github/workflows/test-deploy-fork.yml @@ -6,8 +6,8 @@ concurrency: on: workflow_run: - workflows: ["Build PR From Fork"] - types: ["completed"] + workflows: ['Build PR From Fork'] + types: ['completed'] jobs: prepare_jobs: @@ -22,7 +22,7 @@ jobs: uses: dawidd6/action-download-artifact@ea71f332a90fd52416b1629b933dcf7e0ccd421d # v2.22.0 with: workflow: build-fork.yml - run_id: "${{ github.event.workflow_run.id }}" + run_id: '${{ github.event.workflow_run.id }}' workflow_conclusion: success name: pr path: ./ @@ -46,7 +46,7 @@ jobs: next_js_analyze: runs-on: ubuntu-latest - needs: ["prepare_jobs"] + needs: ['prepare_jobs'] env: PR_NUMBER: ${{ needs.prepare_jobs.outputs.pr_number }} steps: @@ -56,11 +56,11 @@ jobs: - uses: ./.github/actions/analyze-comment with: - PULL_REQUEST_NUMBER: "${{ env.PR_NUMBER }}" + PULL_REQUEST_NUMBER: '${{ env.PR_NUMBER }}' cypress_smoke_v2: runs-on: ubuntu-latest - needs: ["prepare_jobs"] + needs: ['prepare_jobs'] strategy: fail-fast: false matrix: @@ -82,7 +82,7 @@ jobs: cypress_smoke_v3: runs-on: ubuntu-latest - needs: ["prepare_jobs"] + needs: ['prepare_jobs'] strategy: fail-fast: false matrix: @@ -147,7 +147,7 @@ jobs: cypress_full_v2: runs-on: ubuntu-latest - needs: ["deploy_fork"] + needs: ['deploy_fork'] strategy: fail-fast: false matrix: @@ -169,7 +169,7 @@ jobs: cypress_full_v3: runs-on: ubuntu-latest - needs: ["deploy_fork"] + needs: ['deploy_fork'] strategy: fail-fast: false matrix: @@ -191,7 +191,7 @@ jobs: cypress_additional_v2: runs-on: ubuntu-latest - needs: ["deploy_fork"] + needs: ['deploy_fork'] strategy: fail-fast: false matrix: @@ -212,7 +212,7 @@ jobs: cypress_additional_v3: runs-on: ubuntu-latest - needs: ["deploy_fork"] + needs: ['deploy_fork'] strategy: fail-fast: false matrix: @@ -234,7 +234,7 @@ jobs: cypress_app_functionality: runs-on: ubuntu-latest - needs: ["deploy_fork"] + needs: ['deploy_fork'] strategy: fail-fast: false matrix: @@ -251,7 +251,6 @@ jobs: CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts - notify_failure: runs-on: ubuntu-latest if: failure() @@ -293,5 +292,5 @@ jobs: with: PULL_REQUEST_NUMBER: '${{ env.PR_NUMBER }}' COMMENT_BODY: | - ✅ CI run has succeded! - You can find tests and deployment logs at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + ✅ CI run has succeded! + You can find tests and deployment logs at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/update-prod-staging.yml b/.github/workflows/update-prod-staging.yml index 11371f166c..36d26bd277 100644 --- a/.github/workflows/update-prod-staging.yml +++ b/.github/workflows/update-prod-staging.yml @@ -84,7 +84,7 @@ jobs: with: PINATA_API_KEY: '${{ secrets.PINATA_API_KEY }}' PINATA_SECRET_KEY: '${{ secrets.PINATA_SECRET_KEY }}' - PIN_ALIAS: "app-aave-staging" + PIN_ALIAS: 'app-aave-staging' BUILD_LOCATION: './out_staging' CID_VERSION: 1 From ee6fd903a6115947fc80d22c9c0120263a551fe3 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 15:03:18 +0100 Subject: [PATCH 5/9] chore: update lint-staged --- package.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 576f422061..5953052189 100644 --- a/package.json +++ b/package.json @@ -143,10 +143,7 @@ "Diego Prudencio diego@aave.com" ], "lint-staged": { - "*.{js,jsx,ts,tsx}": [ - "eslint --cache --fix", - "prettier --write" - ], + "*": "yarn lint:fix", "*.svg": "npx svgo --final-newline" }, "nextBundleAnalysis": { From a2b6bb686e2d8bd8f1d087b9a5a41a2243ea2916 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 15:08:37 +0100 Subject: [PATCH 6/9] chore: update contributors --- package.json | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5953052189..ca35432ed3 100644 --- a/package.json +++ b/package.json @@ -132,15 +132,19 @@ "@web3-react/walletlink-connector/@coinbase/wallet-sdk": "3.1.0" }, "contributors": [ - "Pol Sendra ", - "Lukas Strassel ", - "Oleksandr Tkach ", - "David Racero ", + "Anastasia Khovaeva ", "Andrew Schmidt ", + "Bojan Kopunovic Legetin ", + "David Racero ", + "Diego Prudencio ", + "Drew Cook ", + "Lukas Strassel ", + "Mark Grothe ", "Nikita Bokarev ", - "Anastasia Khovaeva ", - "Diego Prudencio diego@aave.com" + "Oleksandr Tkach ", + "Pol Sendra ", + "Vladimir Konstantinovich Yumatov " ], "lint-staged": { "*": "yarn lint:fix", From 962ac6d8fe27cab8763e2304fb68858059dc7012 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 15:10:02 +0100 Subject: [PATCH 7/9] chore: typo --- .github/actions/private-ipfs-pin/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/private-ipfs-pin/action.yml b/.github/actions/private-ipfs-pin/action.yml index d30797f009..4033262074 100644 --- a/.github/actions/private-ipfs-pin/action.yml +++ b/.github/actions/private-ipfs-pin/action.yml @@ -1,5 +1,5 @@ name: Pin to private cluster -description: Upload build to ipfs nodes runnning in GKE +description: Upload build to ipfs nodes running in GKE inputs: DOMAIN: description: Domain to unpin From 3ee5a2642d890e4b01bad47c91ffbfb5944b7d26 Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 15:12:53 +0100 Subject: [PATCH 8/9] chore: typos --- .github/actions/upload-artifacts/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/upload-artifacts/action.yml b/.github/actions/upload-artifacts/action.yml index 62b3d13f0b..57547d6ec9 100644 --- a/.github/actions/upload-artifacts/action.yml +++ b/.github/actions/upload-artifacts/action.yml @@ -6,11 +6,11 @@ inputs: required: false default: out PR_INFO: - description: shoud this artifact be uploaded + description: should this artifact be uploaded required: false default: 'true' NEXTJS_BUILD: - description: shoud this artifact be uploaded + description: should this artifact be uploaded required: false default: 'true' runs: From 146d920ac98c2d8965909041e842f3557b5601ca Mon Sep 17 00:00:00 2001 From: Drew Cook Date: Fri, 16 Sep 2022 15:17:20 +0100 Subject: [PATCH 9/9] chore: add license field --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index ca35432ed3..5246ab1da6 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "aave-ui", "version": "1.0.0", "private": true, + "license": "BSD-3-Clause", "scripts": { "dev": "next dev", "build": "next build",