From e9eb4d1f3dd6b2d40fd86ae25a38d9363139e7c1 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Thu, 22 Sep 2022 12:37:41 -0300 Subject: [PATCH] Fix ESLint not working in CI (#4837) * Update ESLint extensions * Use fredkbot * Only use fredkbot for the commit * Disable autofix * Fix lint error --- .github/workflows/ci.yml | 13 +++++++------ packages/astro/src/core/messages.ts | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b173c37d..c0892d832 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,15 +55,16 @@ jobs: # Otherwise, run lint autofixer - name: Lint if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }} - uses: wearerequired/lint-action@v1.11.1 + uses: wearerequired/lint-action@v2.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: eslint: true + eslint_extensions: js,ts,cts,mts,cjs,mjs prettier: false - auto_fix: true - git_name: github-actions[bot] - git_email: github-actions[bot]@users.noreply.github.com + auto_fix: false + git_name: fredkbot + git_email: fred+astrobot@astro.build commit_message: 'chore(lint): ${linter} fix' github_token: ${{ secrets.GITHUB_TOKEN }} neutral_check_on_warning: true @@ -97,7 +98,7 @@ jobs: - name: Install dependencies run: pnpm install - + - name: Build Packages run: pnpm run build @@ -213,4 +214,4 @@ jobs: run: pnpm run build - name: Test - run: pnpm run test:smoke \ No newline at end of file + run: pnpm run test:smoke diff --git a/packages/astro/src/core/messages.ts b/packages/astro/src/core/messages.ts index a0a536056..278f8ac9f 100644 --- a/packages/astro/src/core/messages.ts +++ b/packages/astro/src/core/messages.ts @@ -134,12 +134,12 @@ export function resolveServerUrls({ networkInterface?.address && networkInterface?.family === (nodeVersion < 18 || nodeVersion >= 18.4 ? 'IPv4' : 4) ); - for (let { address } of ipv4Networks) { - if (address.includes('127.0.0.1')) { - const displayAddress = address.replace('127.0.0.1', localAddress); + for (let { address: ipv4Address } of ipv4Networks) { + if (ipv4Address.includes('127.0.0.1')) { + const displayAddress = ipv4Address.replace('127.0.0.1', localAddress); local = toDisplayUrl(displayAddress); } else { - network = toDisplayUrl(address); + network = toDisplayUrl(ipv4Address); } } }