diff --git a/.changeset/fix-unsupported-script-types.md b/.changeset/fix-unsupported-script-types.md new file mode 100644 index 000000000000..9d412fe1cd55 --- /dev/null +++ b/.changeset/fix-unsupported-script-types.md @@ -0,0 +1,5 @@ +--- +"@biomejs/biome": patch +--- + +Fixed [#9506](https://github.com/biomejs/biome/issues/9506) and [#9479](https://github.com/biomejs/biome/issues/9479): Biome no longer reports false parse errors on ` + + +"#; + + let fs = MemoryFileSystem::default(); + fs.insert(Utf8PathBuf::from("/project/file.html"), FILE_CONTENT); + + let (workspace, project_key) = setup_workspace_and_open_project(fs, "/"); + + workspace + .scan_project(ScanProjectParams { + project_key, + watch: false, + force: false, + scan_kind: ScanKind::Project, + verbose: false, + }) + .unwrap(); + + workspace + .open_file(OpenFileParams { + project_key, + path: BiomePath::new("/project/file.html"), + content: FileContent::FromServer, + document_file_source: None, + persist_node_cache: false, + inline_config: None, + }) + .unwrap(); + + let result = workspace + .pull_diagnostics_and_actions(PullDiagnosticsAndActionsParams { + path: BiomePath::new("/project/file.html"), + only: vec![], + skip: vec![], + enabled_rules: vec![], + project_key, + categories: Default::default(), + inline_config: None, + }) + .unwrap(); + + assert!( + result.diagnostics.is_empty(), + "Expected no diagnostics for unsupported script types, got: {:#?}", + result.diagnostics + ); +} + #[test] fn format_js_with_embedded_css() { const FILE_PATH: &str = "/project/file.js";