Skip to content

biome: run from parent to fix silently broken plugin #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions linters/biome/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools:
runtime: node
package: "@biomejs/biome"
shims: [biome]
known_good_version: 1.9.4
known_good_version: 2.0.5
lint:
definitions:
# Successor to the rome linter+formatter
Expand All @@ -15,6 +15,7 @@ lint:
- astro
- css
- graphql
- html
- javascript
- json
- typescript
Expand All @@ -26,13 +27,15 @@ lint:
' *(?P<path>.*?):(?P<line>\d+):(?P<col>\d+) (?P<code>[^ ]+)(?:[^×]*\n).*×
(?P<message>.*)\n'
run: biome check ${target}
run_from: ${root_or_parent_with_any_config}
success_codes: [0, 1]
batch: true
cache_results: true
read_output_from: stderr
- name: fmt
output: rewrite
run: biome check --fix "${target}"
run_from: ${root_or_parent_with_any_config}
success_codes: [0, 1]
batch: true
cache_results: true
Expand All @@ -47,7 +50,7 @@ lint:
affects_cache:
- package.json
- .editorconfig # Undocumented config file
known_good_version: 1.9.4
known_good_version: 2.0.5
version_command:
parse_regex: biome CLI version ${semver}
run: biome --version
39 changes: 0 additions & 39 deletions linters/biome/test_data/biome_v1.9.4_error.check.shot

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,7 @@ exports[`Testing linter biome test basic_check 1`] = `
"level": "LEVEL_HIGH",
"line": "13",
"linter": "biome",
"message": "This block statement doesn't serve any purpose and can be safely removed.",
"targetType": "typescript",
},
{
"code": "lint/style/useEnumInitializers",
"column": "6",
"file": "test_data/basic_check.in.ts",
"issueClass": "ISSUE_CLASS_EXISTING",
"level": "LEVEL_HIGH",
"line": "4",
"linter": "biome",
"message": "This enum declaration contains members that are implicitly initialized.",
"message": "Formatter would have printed the following content:",
"targetType": "typescript",
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Testing formatter biome test basic_fmt 1`] = `
const barfoo = () => {};

enum Bar {
Baz = 0,
Baz,
}

const foo = (bar: Bar) => {
Expand Down
Loading