oxc-project/oxc · error · OxcDiagnostic
Property name "{value}" is not {case_type}.
Error message
Property name "{value}" is not {case_type}. What it means
Emitted by check_name_node in the vue component-definition-name-casing rule when a property name in the component definition object does not match the configured casing (camelCase or PascalCase). It is a naming-convention guard; the offending value is interpolated into the message with the expected case type.
Source
Thrown at crates/oxc_linter/src/rules/vue/component_definition_name_casing.rs:25
};
use oxc_diagnostics::OxcDiagnostic;
use oxc_macros::declare_oxc_lint;
use oxc_span::{GetSpan, Span};
use crate::{
AstNode,
context::LintContext,
frameworks::FrameworkOptions,
rule::{DefaultRuleConfig, Rule},
utils::{find_property, is_vue_component_options_object, vue_casing},
};
fn component_definition_name_casing_diagnostic(
span: Span,
value: &str,
case_type: &str,
) -> OxcDiagnostic {
OxcDiagnostic::warn(format!("Property name \"{value}\" is not {case_type}.")).with_label(span)
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
enum CaseType {
#[default]
#[serde(rename = "PascalCase")]
PascalCase,
#[serde(rename = "kebab-case")]
KebabCase,
}
impl CaseType {
fn as_str(self) -> &'static str {
match self {
CaseType::PascalCase => "PascalCase",
CaseType::KebabCase => "kebab-case",
}
}View on GitHub (pinned to e1e7af627c)
Solutions
- Rename the property to match the configured casing convention
- Adjust the rule's casing option if the existing naming is intentional
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/oxc_linter/src/rules/vue/component_definition_name_casing.rs:25 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oxc-project/oxc@e1e7af627c (2026-08-20).
Data as JSON: /api/errors/0c4b4d7af2b07048.
Report an issue: GitHub.