diff --git a/linters/biome/plugin.yaml b/linters/biome/plugin.yaml index 4176814b5..44b99c1e1 100644 --- a/linters/biome/plugin.yaml +++ b/linters/biome/plugin.yaml @@ -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 @@ -15,6 +15,7 @@ lint: - astro - css - graphql + - html - javascript - json - typescript @@ -25,29 +26,29 @@ lint: parse_regex: ' *(?P.*?):(?P\d+):(?P\d+) (?P[^ ]+)(?:[^×]*\n).*× (?P.*)\n' - run: biome check ${target} + run: biome check --config-path=${workspace}/biome.jsonc ${target} + run_from: ${root_or_parent_with(biome.jsonc)} success_codes: [0, 1] batch: true - cache_results: true + cache_results: false read_output_from: stderr - name: fmt output: rewrite - run: biome check --fix "${target}" - success_codes: [0, 1] + run: biome format --config-path=${workspace}/biome.jsonc --write ${target} + run_from: ${root_or_parent_with(biome.jsonc)} + success_codes: [0] batch: true - cache_results: true + cache_results: false formatter: true in_place: true tools: [biome] suggest_if: config_present direct_configs: - - biome.json - biome.jsonc - - rome.json # For backwards compatibility with rome 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 diff --git a/linters/biome/test_data/biome_v1.9.4_error.check.shot b/linters/biome/test_data/biome_v1.9.4_error.check.shot deleted file mode 100644 index e959c7ff4..000000000 --- a/linters/biome/test_data/biome_v1.9.4_error.check.shot +++ /dev/null @@ -1,39 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Testing linter biome test error 1`] = ` -{ - "issues": [], - "lintActions": [ - { - "command": "fmt", - "fileGroupName": "typescript", - "linter": "biome", - "paths": [ - "test_data/basic_check.in.ts", - ], - "verb": "TRUNK_VERB_FMT", - }, - { - "command": "lint", - "fileGroupName": "typescript", - "linter": "biome", - "paths": [ - "test_data/basic_check.in.ts", - ], - "verb": "TRUNK_VERB_CHECK", - }, - { - "command": "lint", - "fileGroupName": "typescript", - "linter": "biome", - "paths": [ - "test_data/basic_check.in.ts", - ], - "upstream": true, - "verb": "TRUNK_VERB_CHECK", - }, - ], - "taskFailures": [], - "unformattedFiles": [], -} -`; diff --git a/linters/biome/test_data/biome_v1.9.4_basic_check.check.shot b/linters/biome/test_data/biome_v2.0.5_basic_check.check.shot similarity index 74% rename from linters/biome/test_data/biome_v1.9.4_basic_check.check.shot rename to linters/biome/test_data/biome_v2.0.5_basic_check.check.shot index 4c68082f4..85dbb77b7 100644 --- a/linters/biome/test_data/biome_v1.9.4_basic_check.check.shot +++ b/linters/biome/test_data/biome_v2.0.5_basic_check.check.shot @@ -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", }, ], diff --git a/linters/biome/test_data/biome_v1.9.4_basic_fmt.fmt.shot b/linters/biome/test_data/biome_v2.0.5_basic_fmt.fmt.shot similarity index 96% rename from linters/biome/test_data/biome_v1.9.4_basic_fmt.fmt.shot rename to linters/biome/test_data/biome_v2.0.5_basic_fmt.fmt.shot index 1e2f30ad4..30deff848 100644 --- a/linters/biome/test_data/biome_v1.9.4_basic_fmt.fmt.shot +++ b/linters/biome/test_data/biome_v2.0.5_basic_fmt.fmt.shot @@ -5,7 +5,7 @@ exports[`Testing formatter biome test basic_fmt 1`] = ` const barfoo = () => {}; enum Bar { - Baz = 0, + Baz, } const foo = (bar: Bar) => { diff --git a/linters/biome/test_data/biome_v1.9.4_basic_json.fmt.shot b/linters/biome/test_data/biome_v2.0.5_basic_json.fmt.shot similarity index 100% rename from linters/biome/test_data/biome_v1.9.4_basic_json.fmt.shot rename to linters/biome/test_data/biome_v2.0.5_basic_json.fmt.shot