{"record":{"id":"034885a66f4914d8","repo":"oxc-project/oxc","slug":"prop-property-with-value-property-value-is","errorCode":null,"errorMessage":"Prop \"{property}\" with value \"{property_value}\" is forbidden on DOM Nodes","messagePattern":"Prop \"(.+?)\" with value \"(.+?)\" 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":30,"sourceCode":"\nuse crate::{\n    AstNode,\n    context::{ContextHost, LintContext},\n    rule::{DefaultRuleConfig, Rule},\n    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)]","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/react/forbid_dom_props.rs#L12-L48","documentation":"Raised by react/forbid_dom_props when a forbidden prop is set on a DOM element (lowercase HTML/SVG tag) and the rule config supplies a `allowedFor`/message override or the attribute has a value, producing this message that includes both the property name and its value. At the throw site a host element receives a prop the project has disallowed (often to enforce design-system or a11y policy). run() matches JSX attributes against the configured forbidden list, and the custom message branch takes precedence over the generic variants.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/react/forbid_dom_props.rs:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the prop's value to one not forbidden by the configuration.","Remove the prop entirely if it is unnecessary.","Update the forbid entry if this value should be allowed."],"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-14T00:17:10.932Z"}