{"record":{"id":"9d55a3af36be770d","repo":"oxc-project/oxc","slug":"invalid-property-found","errorCode":null,"errorMessage":"Invalid property found","messagePattern":"Invalid property found","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/react/no_unknown_property.rs","lineNumber":26,"sourceCode":"};\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::{GetSpan, Span};\nuse phf::{Map, Set, phf_map, phf_set};\nuse rustc_hash::{FxHashMap, FxHashSet};\nuse schemars::JsonSchema;\nuse serde::Deserialize;\n\nuse crate::{\n    AstNode,\n    context::{ContextHost, LintContext},\n    globals::is_valid_aria_property,\n    rule::{DefaultRuleConfig, Rule},\n    utils::get_jsx_attribute_name,\n};\n\nfn invalid_prop_on_tag(span: Span, prop: &str, tag: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Invalid property found\")\n        .with_help(format!(\"Property '{prop}' is only allowed on: {tag}\"))\n        .with_label(span)\n}\n\nfn data_lowercase_required(span: Span, suggested_prop: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\n        \"React does not recognize data-* props with uppercase characters on a DOM element\",\n    )\n    .with_help(format!(\"Use '{suggested_prop}' instead\"))\n    .with_label(span)\n}\n\nfn unknown_prop_with_standard_name(span: Span, x1: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Unknown property found\")\n        .with_help(format!(\"Use '{x1}' instead\"))\n        .with_label(span)\n}\n","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/react/no_unknown_property.rs#L8-L44","documentation":"Raised by react/no-unknown-property when a JSX attribute is valid HTML/React but is only allowed on specific tags and appears on another tag (e.g. alt on a non-media element). The help text lists the allowed tags.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/react/no_unknown_property.rs:26 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move the property to one of the allowed tags listed in the help text.","Remove the property if it has no effect on the current element."],"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"}