Skip to content

Commit

Permalink
add biome errorformat
Browse files Browse the repository at this point in the history
  • Loading branch information
mongolyy committed Dec 29, 2023
1 parent 06b0a5a commit c3846b8
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 82 deletions.
86 changes: 69 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,101 @@ on:
branches:
- main
pull_request:
# TODO: replace `<linter-name>` with yours
jobs:
test-check:
name: runner / <linter-name> (github-check)
name: runner / Biome (github-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
- id: action-success-test
name: action-success-test
uses: ./
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-check
level: error
filter_mode: nofilter
fail_on_error: true
biome_flags: ok
- id: action-failure-test
name: action-failure-test
uses: ./
continue-on-error: true
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-check
level: info
locale: "US"
filter_mode: nofilter
fail_on_error: true
biome_flags: error
- name: check-failure
if: steps.action-failure-test.outcome == 'success'
run: exit 1

test-pr-check:
if: github.event_name == 'pull_request'
name: runner / <linter-name> (github-pr-check)
name: runner / Biome (github-pr-check)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
- id: action-success-test
name: action-success-test
uses: ./
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-pr-check
level: error
filter_mode: nofilter
fail_on_error: true
biome_flags: ok
- id: action-failure-test
name: action-failure-test
uses: ./
continue-on-error: true
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-pr-check
level: warning
locale: "US"
workdir: ./testdata/subdir/
level: info
filter_mode: nofilter
fail_on_error: true
biome_flags: error
- name: check-failure
if: steps.action-failure-test.outcome == 'success'
run: exit 1

test-pr-review:
if: github.event_name == 'pull_request'
name: runner / <linter-name> (github-pr-review)
name: runner / Biome (github-pr-review)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
continue-on-error: true
- id: action-success-test
name: action-success-test
uses: ./
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-pr-review
level: error
locale: "US"
filter_mode: file
filter_mode: nofilter
fail_on_error: true
biome_flags: ok
- id: action-failure-test
name: action-failure-test
uses: ./
continue-on-error: true
with:
github_token: ${{ secrets.github_token }}
workdir: ./testdata
reporter: github-pr-review
level: info
filter_mode: nofilter
fail_on_error: true
- name: check the exit code
if: ${{ !success() }}
run: echo 'The previous step should fail' && exit 1
biome_flags: error
- name: check-failure
if: steps.action-failure-test.outcome == 'success'
run: exit 1
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Folders to ignore
.vscode/
.vscode/
.idea/
node_modules/
47 changes: 13 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
# action-composite-template
# reviewdog-action-biome

<!-- TODO: replace reviewdog/action-composite-template with your repo name -->
[![Test](https://github.com/reviewdog/action-composite-template/workflows/Test/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3ATest)
[![reviewdog](https://github.com/reviewdog/action-composite-template/workflows/reviewdog/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Areviewdog)
[![depup](https://github.com/reviewdog/action-composite-template/workflows/depup/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Adepup)
[![release](https://github.com/reviewdog/action-composite-template/workflows/release/badge.svg)](https://github.com/reviewdog/action-composite-template/actions?query=workflow%3Arelease)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-composite-template?logo=github&sort=semver)](https://github.com/reviewdog/action-composite-template/releases)
[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)
This action runs [Biome](https://biomejs.dev/) with [reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve code review experience.

![github-pr-review demo](https://user-images.githubusercontent.com/3797062/73162963-4b8e2b00-4132-11ea-9a3f-f9c6f624c79f.png)
![github-pr-check demo](https://user-images.githubusercontent.com/3797062/73163032-70829e00-4132-11ea-8481-f213a37db354.png)

<!-- TODO: outline your action here -->
This is a template repository for
[reviewdog](https://github.com/reviewdog/reviewdog) action with release
automation based on [action composition](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action).
Click `Use this template` button to create your reviewdog action :dog:!

If you want to create your own reviewdog action from scratch without using this
template, please check and copy release automation flow.
It's important to manage release workflow and sync reviewdog version for all
reviewdog actions.

This repo contains a sample action to run [misspell](https://github.com/client9/misspell).

## Input

<!-- TODO: replace `<linter-name>` with yours -->
```yaml
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
workdir:
description: 'Working directory relative to the root directory.'
description: |
Working directory relative to the root directory.
This is where the action will look for a package.json file which declares Biome as a dependency.
Please note that this is different from the directory where the action will run Biome, which is specified in the biome_flags input.
default: '.'
### Flags for reviewdog ###
tool_name:
description: 'Tool name to use for reviewdog reporter.'
default: '<linter-name>'
default: 'Biome'
level:
description: 'Report level for reviewdog [info,warning,error].'
default: 'error'
Expand All @@ -58,26 +39,24 @@ inputs:
reviewdog_flags:
description: 'Additional reviewdog flags.'
default: ''
### Flags for <linter-name> ###
locale:
description: '-locale flag of misspell. (US/UK)'
default: ''
### Flags for Biome ###
biome_flags:
description: 'Flags and args for Biome command.'
default: '.'
```
## Usage
<!-- TODO: replace reviewdog/action-composite-template with your repo name -->
```yaml
name: reviewdog
on: [pull_request]
jobs:
# TODO: replace `linter_name` and `<linter-name>` with yours
linter_name:
name: runner / <linter-name>
name: runner / Biome
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-composite-template@v1
- uses: mongolyy/reviewdog-action-biome@v1
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-check,github-pr-review,github-pr-check].
Expand Down
27 changes: 14 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# TODO: replace `<linter-name>` and `<your-name>` with yours
name: 'Run <linter-name> with reviewdog'
description: '🐶 Run <linter-name> with reviewdog on pull requests to improve code review experience.'
author: '<your-name>'
name: 'Run Biome with reviewdog'
description: '🐶 Run Biome with reviewdog on pull requests to improve code review experience.'
author: 'mongolyy'
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
workdir:
description: 'Working directory relative to the root directory.'
description: |
Working directory relative to the root directory.
This is where the action will look for a package.json file which declares Biome as a dependency.
Please note that this is different from the directory where the action will run Biome, which is specified in the biome_flags input.
default: '.'
### Flags for reviewdog ###
tool_name:
description: 'Tool name to use for reviewdog reporter.'
default: '<linter-name>'
default: 'Biome'
level:
description: 'Report level for reviewdog [info,warning,error].'
default: 'error'
Expand All @@ -32,16 +34,16 @@ inputs:
reviewdog_flags:
description: 'Additional reviewdog flags.'
default: ''
### Flags for <linter-name> ###
locale:
description: '-locale flag of misspell. (US/UK)'
default: ''
### Flags for Biome ###
biome_flags:
description: 'Flags and args for Biome command.'
default: '.'
runs:
using: 'composite'
steps:
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: v0.15.0
reviewdog_version: v0.16.0
- run: $GITHUB_ACTION_PATH/script.sh
shell: bash
env:
Expand All @@ -55,10 +57,9 @@ runs:
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_REVIEWDOG_FLAGS: ${{ inputs.reviewdog_flags }}
INPUT_LOCALE: ${{ inputs.locale }}
INPUT_BIOME_FLAGS: ${{ inputs.biome_flags }}

# Ref: https://haya14busa.github.io/github-action-brandings/
# TODO: update branding if you want.
branding:
icon: 'check'
color: 'blue'
33 changes: 23 additions & 10 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@ fi

export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

echo '::group::🐶 Installing misspell ... https://github.com/client9/misspell'
TEMP_PATH="$(mktemp -d)"
PATH="${TEMP_PATH}:$PATH"
wget -O - -q https://git.io/misspell | sh -s -- -b "${TEMP_PATH}"
echo '::endgroup::'
if [ ! -f "$(npm root)"/.bin/biome ]; then
echo '::group::🐶 Installing Biome...'
npm install
echo '::endgroup::'
fi

if [ ! -f "$(npm root)"/.bin/biome ]; then
echo "❌ Unable to locate or install Biome. Did you provide a workdir which contains a valid package.json?"
exit 1
fi

echo "Biome $("$(npm root)"/.bin/biome --version)"

echo '::group:: Running misspell with reviewdog 🐶 ...'
# shellcheck disable=SC2086
misspell -locale="${INPUT_LOCALE}" . |
reviewdog -efm="%f:%l:%c: %m" \
echo '::group:: Running Biome with reviewdog 🐶 ...'
"$(npm root)"/.bin/biome ci "${INPUT_BIOME_FLAGS}" 2>&1 |
reviewdog \
-efm="%C" \
-efm="%-Gci ━%#" \
-efm="%E%f:%l:%c %.%#━" \
-efm="%Z × %m" \
-efm="%E%f %m %.%#━" \
-efm="%Z × %m" \
-efm="%-G%.%#" \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}
"${INPUT_REVIEWDOG_FLAGS}"
exit_code=$?
echo '::endgroup::'
exit $exit_code
5 changes: 5 additions & 0 deletions testdata/error/format.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html {}

div { color: white;}

div { color: white; background-color: red;}
1 change: 1 addition & 0 deletions testdata/error/format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const a = [2,2,1,3];

Check failure on line 1 in testdata/error/format.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 format File content differs from formatting output Raw Output: error/format.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × File content differs from formatting output
3 changes: 3 additions & 0 deletions testdata/error/lint.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@font-face foo {}
@font-face foo;
@font-face ;
5 changes: 5 additions & 0 deletions testdata/error/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[a a, ++b, ] = test;

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `a` Raw Output: error/lint.js:1:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `a`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Invalid assignment to `++b` Raw Output: error/lint.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid assignment to `++b`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 lint The file contains diagnostics that needs to be addressed. Raw Output: error/lint.js lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × The file contains diagnostics that needs to be addressed.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 format Format with errors is disabled. Raw Output: error/lint.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Format with errors is disabled.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `a` Raw Output: error/lint.js:1:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `a`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Invalid assignment to `++b` Raw Output: error/lint.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid assignment to `++b`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 lint The file contains diagnostics that needs to be addressed. Raw Output: error/lint.js lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × The file contains diagnostics that needs to be addressed.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 format Format with errors is disabled. Raw Output: error/lint.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Format with errors is disabled.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `a` Raw Output: error/lint.js:1:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `a`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Invalid assignment to `++b` Raw Output: error/lint.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid assignment to `++b`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 lint The file contains diagnostics that needs to be addressed. Raw Output: error/lint.js lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × The file contains diagnostics that needs to be addressed.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 format Format with errors is disabled. Raw Output: error/lint.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Format with errors is disabled.

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `a` Raw Output: error/lint.js:1:4 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `a`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Invalid assignment to `++b` Raw Output: error/lint.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Invalid assignment to `++b`

Check failure on line 1 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 lint The file contains diagnostics that needs to be addressed. Raw Output: error/lint.js lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × The file contains diagnostics that needs to be addressed.
[a, c, ...rest,] = test;

Check failure on line 2 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 rest element may not have a trailing comma Raw Output: error/lint.js:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × rest element may not have a trailing comma

Check failure on line 2 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 rest element may not have a trailing comma Raw Output: error/lint.js:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × rest element may not have a trailing comma

Check failure on line 2 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 rest element may not have a trailing comma Raw Output: error/lint.js:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × rest element may not have a trailing comma

Check failure on line 2 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 rest element may not have a trailing comma Raw Output: error/lint.js:2:15 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × rest element may not have a trailing comma
[a = , = "test"] = test;

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an expression, or an assignment but instead found ','. Raw Output: error/lint.js:3:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression, or an assignment but instead found ','.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an identifier, or an assignment target but instead found '='. Raw Output: error/lint.js:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, or an assignment target but instead found '='.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an expression, or an assignment but instead found ','. Raw Output: error/lint.js:3:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression, or an assignment but instead found ','.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an identifier, or an assignment target but instead found '='. Raw Output: error/lint.js:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, or an assignment target but instead found '='.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an expression, or an assignment but instead found ','. Raw Output: error/lint.js:3:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression, or an assignment but instead found ','.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an identifier, or an assignment target but instead found '='. Raw Output: error/lint.js:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, or an assignment target but instead found '='.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an expression, or an assignment but instead found ','. Raw Output: error/lint.js:3:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression, or an assignment but instead found ','.

Check failure on line 3 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 Expected an identifier, or an assignment target but instead found '='. Raw Output: error/lint.js:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, or an assignment target but instead found '='.
[[a b] [c]]= test;

Check failure on line 4 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `b` Raw Output: error/lint.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `b`

Check failure on line 4 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `b` Raw Output: error/lint.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `b`

Check failure on line 4 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `b` Raw Output: error/lint.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `b`

Check failure on line 4 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `b` Raw Output: error/lint.js:4:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `b`
[a: b] = c

Check failure on line 5 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `:` Raw Output: error/lint.js:5:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `:`

Check failure on line 5 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `:` Raw Output: error/lint.js:5:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `:`

Check failure on line 5 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `:` Raw Output: error/lint.js:5:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `:`

Check failure on line 5 in testdata/error/lint.js

View workflow job for this annotation

GitHub Actions / runner / Biome (github-check)

[Biome] reported by reviewdog 🐶 expected `,` but instead found `:` Raw Output: error/lint.js:5:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `:`
11 changes: 11 additions & 0 deletions testdata/ok/format.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
html {
}

div {
color: white;
}

div {
color: white;
background-color: red;
}
1 change: 1 addition & 0 deletions testdata/ok/format.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const a = [2, 2, 1, 3];
1 change: 1 addition & 0 deletions testdata/ok/lint.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@font-face {}
1 change: 1 addition & 0 deletions testdata/ok/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[foo, bar] = baz;
Loading

0 comments on commit c3846b8

Please sign in to comment.