{"record":{"id":"3b0967f3494b12c1","repo":"biomejs/biome","slug":"valid-format-document","errorCode":null,"errorMessage":"valid format document","messagePattern":"valid format document","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/biome_service/src/configuration.rs","lineNumber":525,"sourceCode":"    if VERSION == \"0.0.0\" {\n        let schema_path = Utf8Path::new(\"./node_modules/@biomejs/biome/configuration_schema.json\");\n        let options = OpenOptions::default().read(true);\n        if fs.open_with_options(schema_path, options).is_ok() {\n            configuration.schema = Some(schema_path.to_string().into());\n        }\n    } else {\n        configuration.schema =\n            Some(format!(\"https://biomejs.dev/schemas/{VERSION}/schema.json\").into());\n    }\n\n    let contents = serde_json::to_string_pretty(&configuration)\n        .map_err(|_| BiomeDiagnostic::new_serialization_error())?;\n\n    let parsed = parse_json(&contents, JsonParserOptions::default());\n    let formatted =\n        biome_json_formatter::format_node(JsonFormatOptions::default(), &parsed.syntax())?\n            .print()\n            .expect(\"valid format document\");\n\n    config_file\n        .set_content(formatted.as_code().as_bytes())\n        .map_err(|_| WorkspaceError::cant_read_file(format!(\"{path}\")))?;\n\n    Ok(())\n}\n\n/// Returns the rules applied to a specific [Path], given the [Settings]\npub fn to_analyzer_rules(settings: &Settings, path: &Utf8Path) -> AnalyzerRules {\n    let override_indices = settings.matching_override_indices(path);\n    to_analyzer_rules_by_indices(settings, &override_indices)\n}\n\npub(crate) fn to_analyzer_rules_by_indices(\n    settings: &Settings,\n    override_indices: &[usize],\n) -> AnalyzerRules {","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/biomejs/biome/blob/0fca643d22845c28e0e0b7375013155e3f80717f/crates/biome_service/src/configuration.rs#L507-L543","documentation":"Error \"valid format document\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_service/src/configuration.rs:524 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal assertion in configuration formatting; report it with the configuration file that triggered it.","Ensure the formatter produced a valid document before printing it."],"exampleFix":"// Report at https://github.com/biomejs/biome/issues with the configuration used","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0fca643d22845c28e0e0b7375013155e3f80717f","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}