{"record":{"id":"0a54581c5303a772","repo":"oxc-project/oxc","slug":"name-name-is-reserved-in-vue-js-3-x","errorCode":null,"errorMessage":"Name \"{name}\" is reserved in Vue.js 3.x.","messagePattern":"Name \"(.+?)\" is reserved in Vue\\.js 3\\.x\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"warning","filePath":"crates/oxc_linter/src/rules/vue/no_reserved_component_names.rs","lineNumber":37,"sourceCode":"        VUE3_BUILTIN_COMPONENT_NAMES_EXTRA, find_property,\n        is_vue_component_options_object_excluding_instance,\n    },\n};\n\nfn reserved_diagnostic(name: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"Name \\\"{name}\\\" is reserved.\")).with_label(span)\n}\n\nfn reserved_in_html_diagnostic(name: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"Name \\\"{name}\\\" is reserved in HTML.\")).with_label(span)\n}\n\nfn reserved_in_vue_diagnostic(name: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"Name \\\"{name}\\\" is reserved in Vue.js.\")).with_label(span)\n}\n\nfn reserved_in_vue3_diagnostic(name: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"Name \\\"{name}\\\" is reserved in Vue.js 3.x.\")).with_label(span)\n}\n\n#[derive(Debug, Default, Clone, JsonSchema, Deserialize)]\n#[serde(rename_all = \"camelCase\", default, deny_unknown_fields)]\npub struct NoReservedComponentNames {\n    /// Disallow Vue 2 built-in component names (e.g. `Transition`, `KeepAlive`).\n    disallow_vue_built_in_components: bool,\n    /// Disallow Vue 3 built-in component names (e.g. `Teleport`, `Suspense`).\n    /// Note: this also catches Vue 2 built-ins because Vue 3's set includes them.\n    disallow_vue3_built_in_components: bool,\n    /// Match HTML / SVG element names case-sensitively. When `false` (default),\n    /// the capitalized form of an HTML element (e.g. `Div`) is also reported.\n    html_element_case_sensitive: bool,\n}\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/vue/no_reserved_component_names.rs#L19-L55","documentation":"The Vue-3 variant of vue/no-reserved-component-names: 'Name \"{name}\" is reserved in Vue.js 3.x.' It covers the Vue 3 built-in set (VUE3_BUILTIN_COMPONENT_NAMES_EXTRA, e.g. `Teleport`, `Suspense`) and, per the option's doc comment, also catches Vue 2 built-ins because Vue 3's set includes them. Enabled via the rule's `disallowVue3BuiltInComponents` option.","triggerScenarios":"Enabling `disallowVue3BuiltInComponents` and naming a component `Teleport`, `Suspense`, `Transition`, or any other name in the Vue 3 built-in list.","commonSituations":"Vue 3 migrations where local components collide with newly-added built-ins (`Teleport`, `Suspense`); enabling the stricter option as part of adopting Vue 3 lint presets; wrapper components that reused built-in names.","solutions":["Rename the component so it does not collide with any Vue 3 built-in.","If you wrapped a built-in to add props, rename the wrapper and keep the built-in name in templates.","Leave the option enabled in CI so future names are caught at review time.","Re-run oxlint to confirm."],"exampleFix":"// before\nexport default {\n  name: 'Teleport' // reserved in Vue.js 3.x\n}\n\n// after\nexport default {\n  name: 'PortalTarget'\n}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enable `disallowVue3BuiltInComponents` on Vue 3 projects; its set covers Vue 2 built-ins too.","Check new component names against Vue's built-in list (Teleport, Suspense, Transition, ...).","Keep the stricter name rules on in CI so additions are caught at PR time."],"tags":["vue","naming","lint","vue3","reserved-names","components"],"backgroundTag":"reserved-name-collision","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"}