From 10d585bdd33f10bc724bd4f3cf418360b8629769 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 20 Feb 2026 17:05:49 +0000 Subject: [PATCH 1/2] ci: speedup linting (#15598) * ci: speedup linting * improve linting --- .github/workflows/ci.yml | 19 +++- biome.jsonc | 2 +- package.json | 4 +- .../vscode/languages/astro.code-snippets | 90 +++++++++---------- packages/markdown/remark/package.json | 1 - pnpm-lock.yaml | 74 +++++++-------- 6 files changed, 102 insertions(+), 88 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b89dcfa26558..2a8fbe58b60c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,12 +90,27 @@ jobs: - name: Build Packages if: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'withastro' }} run: pnpm run build - + + biome-lint: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + persist-credentials: false + - name: Setup Biome + uses: biomejs/setup-biome@v2 + - name: Run Biome + run: biome ci --formatter-enabled=false --enforce-assist=false --reporter=default --reporter=github + lint: name: Lint runs-on: ubuntu-latest timeout-minutes: 5 - needs: build + needs: + - biome-lint steps: - name: Disable git crlf run: git config --global core.autocrlf false diff --git a/biome.jsonc b/biome.jsonc index 5d842c8e8096..c661d7f0e49e 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.15/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.2/schema.json", "files": { "includes": [ "**", diff --git a/package.json b/package.json index 1badfc9c2977..0c0d6ccd5e52 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "test:e2e:hosts": "turbo run test:hosted", "benchmark": "astro-benchmark", "lint": "biome lint && knip && eslint . --report-unused-disable-directives-severity=warn --concurrency=auto", - "lint:ci": "biome ci --formatter-enabled=false --enforce-assist=false --reporter=github && eslint . --concurrency=auto --report-unused-disable-directives-severity=warn && knip", + "lint:ci": "knip && eslint . --concurrency=auto --report-unused-disable-directives-severity=warn", "lint:fix": "biome lint --write --unsafe", "publint": "pnpm -r --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --no-bail exec publint", "version": "changeset version && node ./scripts/deps/update-example-versions.js && pnpm install --no-frozen-lockfile && pnpm run format", @@ -61,7 +61,7 @@ }, "devDependencies": { "@astrojs/check": "^0.9.5", - "@biomejs/biome": "2.3.15", + "@biomejs/biome": "2.4.2", "@changesets/changelog-github": "^0.5.2", "@changesets/cli": "^2.29.8", "@flue/cli": "^0.0.32", diff --git a/packages/language-tools/vscode/languages/astro.code-snippets b/packages/language-tools/vscode/languages/astro.code-snippets index 1004bf35bcac..3ebeb15b49bf 100644 --- a/packages/language-tools/vscode/languages/astro.code-snippets +++ b/packages/language-tools/vscode/languages/astro.code-snippets @@ -1,47 +1,47 @@ { - "page_html": { - "prefix": "page_html", - "isFileTemplate": true, - "scope": "astro", - "body": [ - "---", - "$1", - "---", - "", - "", - "\t", - "\t\t", - "\t\t", - "\t\t", - "\t\t${2:Document}", - "\t", - "\t", - "\t\t$0", - "\t", - "", - ], - "description": "Page with full HTML", - }, - "page_layout": { - "prefix": "page_layout", - "isFileTemplate": true, - "scope": "astro", - "body": [ - "---", - "import ${1:Layout} from \"../layouts/$1.astro\"", - "---", - "", - "<$1>", - "\t$0", - "", - ], - "description": "Page from Layout", - }, - "component": { - "prefix": "component", - "isFileTemplate": true, - "scope": "astro", - "body": ["---", "$1", "---", "", "$0"], - "description": "Component", - }, + "page_html": { + "prefix": "page_html", + "isFileTemplate": true, + "scope": "astro", + "body": [ + "---", + "$1", + "---", + "", + "", + "\t", + "\t\t", + "\t\t", + "\t\t", + "\t\t${2:Document}", + "\t", + "\t", + "\t\t$0", + "\t", + "" + ], + "description": "Page with full HTML" + }, + "page_layout": { + "prefix": "page_layout", + "isFileTemplate": true, + "scope": "astro", + "body": [ + "---", + "import ${1:Layout} from \"../layouts/$1.astro\"", + "---", + "", + "<$1>", + "\t$0", + "" + ], + "description": "Page from Layout" + }, + "component": { + "prefix": "component", + "isFileTemplate": true, + "scope": "astro", + "body": ["---", "$1", "---", "", "$0"], + "description": "Component" + } } diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 65fca0df5e17..53ca36695524 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -14,7 +14,6 @@ "main": "./dist/index.js", "exports": { ".": "./dist/index.js", - "./shiki/engine": "./dist/engine.js", "./shiki": "./dist/shiki.js", "./shiki-style-collector": "./dist/shiki-style-collector.js", "./transformers/style-to-class": "./dist/transformers/style-to-class.js" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e8cbc6b69c2..10659a974432 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: specifier: ^0.9.5 version: 0.9.6(prettier-plugin-astro@0.14.1)(prettier@3.8.1)(typescript@5.9.3) '@biomejs/biome': - specifier: 2.3.15 - version: 2.3.15 + specifier: 2.4.2 + version: 2.4.2 '@changesets/changelog-github': specifier: ^0.5.2 version: 0.5.2 @@ -7416,59 +7416,59 @@ packages: resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} - '@biomejs/biome@2.3.15': - resolution: {integrity: sha512-u+jlPBAU2B45LDkjjNNYpc1PvqrM/co4loNommS9/sl9oSxsAQKsNZejYuUztvToB5oXi1tN/e62iNd6ESiY3g==} + '@biomejs/biome@2.4.2': + resolution: {integrity: sha512-vVE/FqLxNLbvYnFDYg3Xfrh1UdFhmPT5i+yPT9GE2nTUgI4rkqo5krw5wK19YHBd7aE7J6r91RRmb8RWwkjy6w==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.3.15': - resolution: {integrity: sha512-SDCdrJ4COim1r8SNHg19oqT50JfkI/xGZHSyC6mGzMfKrpNe/217Eq6y98XhNTc0vGWDjznSDNXdUc6Kg24jbw==} + '@biomejs/cli-darwin-arm64@2.4.2': + resolution: {integrity: sha512-3pEcKCP/1POKyaZZhXcxFl3+d9njmeAihZ17k8lL/1vk+6e0Cbf0yPzKItFiT+5Yh6TQA4uKvnlqe0oVZwRxCA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.3.15': - resolution: {integrity: sha512-RkyeSosBtn3C3Un8zQnl9upX0Qbq4E3QmBa0qjpOh1MebRbHhNlRC16jk8HdTe/9ym5zlfnpbb8cKXzW+vlTxw==} + '@biomejs/cli-darwin-x64@2.4.2': + resolution: {integrity: sha512-P7hK1jLVny+0R9UwyGcECxO6sjETxfPyBm/1dmFjnDOHgdDPjPqozByunrwh4xPKld8sxOr5eAsSqal5uKgeBg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.3.15': - resolution: {integrity: sha512-SSSIj2yMkFdSkXqASzIBdjySBXOe65RJlhKEDlri7MN19RC4cpez+C0kEwPrhXOTgJbwQR9QH1F4+VnHkC35pg==} + '@biomejs/cli-linux-arm64-musl@2.4.2': + resolution: {integrity: sha512-/x04YK9+7erw6tYEcJv9WXoBHcULI/wMOvNdAyE9S3JStZZ9yJyV67sWAI+90UHuDo/BDhq0d96LDqGlSVv7WA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [musl] - '@biomejs/cli-linux-arm64@2.3.15': - resolution: {integrity: sha512-FN83KxrdVWANOn5tDmW6UBC0grojchbGmcEz6JkRs2YY6DY63sTZhwkQ56x6YtKhDVV1Unz7FJexy8o7KwuIhg==} + '@biomejs/cli-linux-arm64@2.4.2': + resolution: {integrity: sha512-DI3Mi7GT2zYNgUTDEbSjl3e1KhoP76OjQdm8JpvZYZWtVDRyLd3w8llSr2TWk1z+U3P44kUBWY3X7H9MD1/DGQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] libc: [glibc] - '@biomejs/cli-linux-x64-musl@2.3.15': - resolution: {integrity: sha512-dbjPzTh+ijmmNwojFYbQNMFp332019ZDioBYAMMJj5Ux9d8MkM+u+J68SBJGVwVeSHMYj+T9504CoxEzQxrdNw==} + '@biomejs/cli-linux-x64-musl@2.4.2': + resolution: {integrity: sha512-wbBmTkeAoAYbOQ33f6sfKG7pcRSydQiF+dTYOBjJsnXO2mWEOQHllKlC2YVnedqZFERp2WZhFUoO7TNRwnwEHQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [musl] - '@biomejs/cli-linux-x64@2.3.15': - resolution: {integrity: sha512-T8n9p8aiIKOrAD7SwC7opiBM1LYGrE5G3OQRXWgbeo/merBk8m+uxJ1nOXMPzfYyFLfPlKF92QS06KN1UW+Zbg==} + '@biomejs/cli-linux-x64@2.4.2': + resolution: {integrity: sha512-GK2ErnrKpWFigYP68cXiCHK4RTL4IUWhK92AFS3U28X/nuAL5+hTuy6hyobc8JZRSt+upXt1nXChK+tuHHx4mA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] libc: [glibc] - '@biomejs/cli-win32-arm64@2.3.15': - resolution: {integrity: sha512-puMuenu/2brQdgqtQ7geNwQlNVxiABKEZJhMRX6AGWcmrMO8EObMXniFQywy2b81qmC+q+SDvlOpspNwz0WiOA==} + '@biomejs/cli-win32-arm64@2.4.2': + resolution: {integrity: sha512-k2uqwLYrNNxnaoiW3RJxoMGnbKda8FuCmtYG3cOtVljs3CzWxaTR+AoXwKGHscC9thax9R4kOrtWqWN0+KdPTw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.3.15': - resolution: {integrity: sha512-kDZr/hgg+igo5Emi0LcjlgfkoGZtgIpJKhnvKTRmMBv6FF/3SDyEV4khBwqNebZIyMZTzvpca9sQNSXJ39pI2A==} + '@biomejs/cli-win32-x64@2.4.2': + resolution: {integrity: sha512-9ma7C4g8Sq3cBlRJD2yrsHXB1mnnEBdpy7PhvFrylQWQb4PoyCmPucdX7frvsSBQuFtIiKCrolPl/8tCZrKvgQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -16840,39 +16840,39 @@ snapshots: '@bcoe/v8-coverage@1.0.2': {} - '@biomejs/biome@2.3.15': + '@biomejs/biome@2.4.2': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.3.15 - '@biomejs/cli-darwin-x64': 2.3.15 - '@biomejs/cli-linux-arm64': 2.3.15 - '@biomejs/cli-linux-arm64-musl': 2.3.15 - '@biomejs/cli-linux-x64': 2.3.15 - '@biomejs/cli-linux-x64-musl': 2.3.15 - '@biomejs/cli-win32-arm64': 2.3.15 - '@biomejs/cli-win32-x64': 2.3.15 + '@biomejs/cli-darwin-arm64': 2.4.2 + '@biomejs/cli-darwin-x64': 2.4.2 + '@biomejs/cli-linux-arm64': 2.4.2 + '@biomejs/cli-linux-arm64-musl': 2.4.2 + '@biomejs/cli-linux-x64': 2.4.2 + '@biomejs/cli-linux-x64-musl': 2.4.2 + '@biomejs/cli-win32-arm64': 2.4.2 + '@biomejs/cli-win32-x64': 2.4.2 - '@biomejs/cli-darwin-arm64@2.3.15': + '@biomejs/cli-darwin-arm64@2.4.2': optional: true - '@biomejs/cli-darwin-x64@2.3.15': + '@biomejs/cli-darwin-x64@2.4.2': optional: true - '@biomejs/cli-linux-arm64-musl@2.3.15': + '@biomejs/cli-linux-arm64-musl@2.4.2': optional: true - '@biomejs/cli-linux-arm64@2.3.15': + '@biomejs/cli-linux-arm64@2.4.2': optional: true - '@biomejs/cli-linux-x64-musl@2.3.15': + '@biomejs/cli-linux-x64-musl@2.4.2': optional: true - '@biomejs/cli-linux-x64@2.3.15': + '@biomejs/cli-linux-x64@2.4.2': optional: true - '@biomejs/cli-win32-arm64@2.3.15': + '@biomejs/cli-win32-arm64@2.4.2': optional: true - '@biomejs/cli-win32-x64@2.3.15': + '@biomejs/cli-win32-x64@2.4.2': optional: true '@bluwy/giget-core@0.1.6': From b20f1b3d94786866409177ec64df18c54b6b6a4d Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 20 Feb 2026 17:06:44 +0000 Subject: [PATCH 2/2] [ci] format --- .../vscode/languages/astro.code-snippets | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/packages/language-tools/vscode/languages/astro.code-snippets b/packages/language-tools/vscode/languages/astro.code-snippets index 3ebeb15b49bf..1004bf35bcac 100644 --- a/packages/language-tools/vscode/languages/astro.code-snippets +++ b/packages/language-tools/vscode/languages/astro.code-snippets @@ -1,47 +1,47 @@ { - "page_html": { - "prefix": "page_html", - "isFileTemplate": true, - "scope": "astro", - "body": [ - "---", - "$1", - "---", - "", - "", - "\t", - "\t\t", - "\t\t", - "\t\t", - "\t\t${2:Document}", - "\t", - "\t", - "\t\t$0", - "\t", - "" - ], - "description": "Page with full HTML" - }, - "page_layout": { - "prefix": "page_layout", - "isFileTemplate": true, - "scope": "astro", - "body": [ - "---", - "import ${1:Layout} from \"../layouts/$1.astro\"", - "---", - "", - "<$1>", - "\t$0", - "" - ], - "description": "Page from Layout" - }, - "component": { - "prefix": "component", - "isFileTemplate": true, - "scope": "astro", - "body": ["---", "$1", "---", "", "$0"], - "description": "Component" - } + "page_html": { + "prefix": "page_html", + "isFileTemplate": true, + "scope": "astro", + "body": [ + "---", + "$1", + "---", + "", + "", + "\t", + "\t\t", + "\t\t", + "\t\t", + "\t\t${2:Document}", + "\t", + "\t", + "\t\t$0", + "\t", + "", + ], + "description": "Page with full HTML", + }, + "page_layout": { + "prefix": "page_layout", + "isFileTemplate": true, + "scope": "astro", + "body": [ + "---", + "import ${1:Layout} from \"../layouts/$1.astro\"", + "---", + "", + "<$1>", + "\t$0", + "", + ], + "description": "Page from Layout", + }, + "component": { + "prefix": "component", + "isFileTemplate": true, + "scope": "astro", + "body": ["---", "$1", "---", "", "$0"], + "description": "Component", + }, }