{"record":{"id":"31a6a448aecce142","repo":"oxc-project/oxc","slug":"the-proto-property-is-deprecated","errorCode":null,"errorMessage":"The '__proto__' property is deprecated","messagePattern":"The '__proto__' property is deprecated","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/eslint/no_proto.rs","lineNumber":8,"sourceCode":"use oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::{GetSpan, Span};\n\nuse crate::{AstNode, context::LintContext, rule::Rule};\n\nfn no_proto_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"The '__proto__' property is deprecated\")\n        .with_help(\"use `Object.getPrototypeOf` and `Object.setPrototypeOf` instead.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct NoProto;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Disallow the use of the `__proto__` property.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// The `__proto__` property has been deprecated as of ECMAScript 3.1 and\n    /// shouldn’t be used in new code. Use `Object.getPrototypeOf` and\n    /// `Object.setPrototypeOf` instead.\n    ///","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/no_proto.rs#L1-L26","documentation":"Lint diagnostic from eslint/no-proto: the deprecated __proto__ property was accessed (via dot access or computed '__proto__'). It is a legacy Annex-B feature whose behavior varies across environments; the static Object helpers are the standard replacements named in the help text.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/eslint/no_proto.rs:8 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use Object.getPrototypeOf(obj) to read the prototype","Use Object.setPrototypeOf(obj, proto) or Object.create(proto) to set it"],"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-14T05:17:10.506Z"}