{"record":{"id":"4b60a864d8f86788","repo":"oxc-project/oxc","slug":"prop-property-is-forbidden-on-dom-nodes","errorCode":null,"errorMessage":"Prop \"{property}\" is forbidden on DOM Nodes","messagePattern":"Prop \"(.+?)\" is forbidden on DOM Nodes","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/react/forbid_dom_props.rs","lineNumber":35,"sourceCode":"    utils::is_react_component_name,\n};\n\nfn forbid_dom_props_diagnostic(\n    span: Span,\n    property: &str,\n    property_value: Option<&str>,\n    message: Option<&String>,\n) -> OxcDiagnostic {\n    if let Some(message) = message {\n        return OxcDiagnostic::warn(message.clone()).with_label(span);\n    }\n    if let Some(property_value) = property_value {\n        return OxcDiagnostic::warn(format!(\n            r#\"Prop \"{property}\" with value \"{property_value}\" is forbidden on DOM Nodes\"#\n        ))\n        .with_label(span);\n    }\n    OxcDiagnostic::warn(format!(r#\"Prop \"{property}\" is forbidden on DOM Nodes\"#)).with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\nstruct ForbidPropOptions {\n    disallowed_for: FxHashSet<CompactStr>,\n    disallowed_values: Option<FxHashSet<CompactStr>>,\n    message: Option<String>,\n}\n\n#[derive(Debug, Default, Clone, Deserialize, JsonSchema)]\n#[serde(from = \"ForbidDomPropsConfig\")]\npub struct ForbidDomProps {\n    #[serde(skip)]\n    forbid: Box<FxHashMap<CompactStr, ForbidPropOptions>>,\n}\n\nimpl From<ForbidDomPropsConfig> for ForbidDomProps {\n    fn from(config: ForbidDomPropsConfig) -> Self {","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/react/forbid_dom_props.rs#L17-L53","documentation":"Raised by react/forbid_dom_props when a configured-forbidden prop appears on a DOM element and no value is present (boolean-style attribute) and no custom message is configured. At the throw site a host element like `<div propName />` carries a prop the project forbids on DOM nodes. forbid_dom_props_diagnostic falls through to this generic message after the custom-message and value-bearing branches are exhausted.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/react/forbid_dom_props.rs:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the forbidden prop from the DOM element.","Substitute the standard/allowed attribute for the forbidden one."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}