{"record":{"id":"b2a92ca33710ef93","repo":"Automattic/harper","slug":"isolateenglish-path-must-be-a-boolean","errorCode":null,"errorMessage":"isolateEnglish path must be a boolean.","messagePattern":"isolateEnglish path must be a boolean\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"harper-ls/src/config.rs","lineNumber":176,"sourceCode":"        }\n\n        if let Some(v) = value.get(\"diagnosticSeverity\") {\n            base.diagnostic_severity = serde_json::from_value(v.clone())?;\n        }\n\n        if let Some(v) = value.get(\"dialect\") {\n            base.dialect = serde_json::from_value(v.clone())?;\n        }\n\n        if let Some(v) = value.get(\"codeActions\") {\n            base.code_action_config = CodeActionConfig::from_lsp_config(v.clone())?;\n        }\n\n        if let Some(v) = value.get(\"isolateEnglish\") {\n            if let Value::Bool(v) = v {\n                base.isolate_english = *v;\n            } else {\n                bail!(\"isolateEnglish path must be a boolean.\");\n            }\n        }\n\n        if let Some(v) = value.get(\"maxFileLength\") {\n            base.max_file_length = serde_json::from_value(v.clone())?;\n        }\n\n        if let Some(v) = value.get(\"markdown\")\n            && let Some(v) = v.get(\"IgnoreLinkTitle\")\n        {\n            base.markdown_options.ignore_link_title = serde_json::from_value(v.clone())?;\n        }\n\n        if let Some(v) = value.get(\"excludePatterns\") {\n            let Some(a) = v.as_array() else {\n                bail!(\"excludePatterns must be an array.\");\n            };\n","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/Automattic/harper/blob/5fe7d5ab76492d83f3ecdbc3f1da83c75dcb6f83/harper-ls/src/config.rs#L158-L194","documentation":"`from_lsp_config` requires the `isolateEnglish` setting to be a JSON boolean when present; it is copied directly into `isolate_english`. Any non-boolean value (string \"true\", number, null) aborts config parsing with this error. As with statsPath, the message text says \"path\" though the setting is a boolean flag.","triggerScenarios":"Config payload with `isolateEnglish` as the string \"true\"/\"false\", a number 0/1, or null instead of a real JSON boolean.","commonSituations":"Users quoting boolean values in settings files (`\"isolateEnglish\": \"true\"`), environment-driven config generation casting booleans to strings, or YAML/TOML-to-JSON conversions that turned the flag into a string.","solutions":["Change the value to an unquoted JSON boolean: true or false.","Remove the key to use the default behavior.","Fix any config generator or template that stringifies booleans."],"exampleFix":"// before\n{ \"isolateEnglish\": \"true\" }\n// after\n{ \"isolateEnglish\": true }","handlingStrategy":"validation","validationCode":"if ('isolateEnglish' in cfg && typeof cfg.isolateEnglish !== 'boolean') {\n  throw new TypeError(`isolateEnglish must be a boolean, got ${typeof cfg.isolateEnglish}`);\n}","typeGuard":"function isIsolateEnglishOk(cfg) {\n  return !('isolateEnglish' in cfg) || typeof cfg.isolateEnglish === 'boolean';\n}","tryCatchPattern":null,"preventionTips":["Use unquoted true/false in JSON settings","Watch for templates/generators that stringify booleans","Note the error text says \"path\" — the actual key is the boolean isolateEnglish"],"tags":["lsp","config","type-mismatch","boolean"],"backgroundTag":"config-type-mismatch","analyzedSha":"5fe7d5ab76492d83f3ecdbc3f1da83c75dcb6f83","analyzedAt":"2026-09-06T11:34:38.610Z","contentChangedAt":"2026-09-06T11:34:38.610Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}