{"record":{"id":"7a427d8218dabe73","repo":"oxc-project/oxc","slug":"use-imports-from-vue-instead-of-vue","errorCode":null,"errorMessage":"Use imports from `vue` instead of `@vue/*`.","messagePattern":"Use imports from `vue` instead of `@vue/\\*`\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/vue/prefer_import_from_vue.rs","lineNumber":8,"sourceCode":"use oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{context::LintContext, rule::Rule};\n\nfn prefer_import_from_vue_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Use imports from `vue` instead of `@vue/*`.\").with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct PreferImportFromVue;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Enforce imports from `vue` instead of `@vue/*`.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// Imports from the following modules are almost always wrong. You should import from vue instead.\n    /// - `@vue/runtime-dom`\n    /// - `@vue/runtime-core`\n    /// - `@vue/reactivity`\n    /// - `@vue/shared`\n    ///","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/vue/prefer_import_from_vue.rs#L1-L26","documentation":"Emitted by run_once of the vue prefer-import-from-vue rule when it finds an import statement referencing a @vue/* scoped package (e.g. @vue/reactivity). These internals are almost always meant to be imported from the single vue entry point instead, so the guard flags the scoped specifier.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/vue/prefer_import_from_vue.rs:8 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the import source from @vue/* to vue, e.g. import { ref } from 'vue'","If you truly need internals, disable the rule for that line with an inline comment"],"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"}