You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: prefer_dom_node_dataset.rs
    path of file: ./repos/oxc/crates/oxc_linter/src/rules/unicorn
    
    the code of the file until where you have to start completion: use oxc_ast::{
    ast::{Argument, Expression},
    AstKind,
};
use oxc_diagnostics::{
    miette::{self, Diagnostic},
    thiserror::Error,
};
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;

use crate::{context::LintContext, rule::Rule, AstNode};

#[derive(Debug, Error, Diagnostic)]
enum PreferDomNodeDatasetDiagnostic {
    #[error("eslint-plugin-unicorn(prefer-dom-node-dataset): Prefer using `dataset` over `setAttribute`.")]
    #[diagnostic(
        severity(warning),
        help("Access the `.dataset` object directly: `element.dataset.{1} = ...;`")
    )]
    Set(#[label] Span, String),
    #[error("eslint-plugin-unicorn(prefer-dom-node-dataset): Prefer using `dataset` over `getAttribute`.")]
    #[diagnostic(
        severity(warning),
        help("Access the `.dataset` object directly: `element.dataset.{1}`")
    )]
    Get(#[label] Span, String),
    #[error("eslint-plugin-unicorn(prefer-dom-node-dataset): Prefer using `dataset` over `hasAttribute`.")]
    #[diagnostic(
        severity(warning),
        help("Check the `dataset` object directly: `Object.hasOwn(element.dataset, '{1}')")
    )]
    Has(#[label] Span, String),
    #[error("eslint-plugin-unicorn(prefer-dom-node-dataset): Prefer using `dataset` over `removeAttribute`.")]
    #[diagnostic(
        severity(warning),
        help("Access the `.dataset` object directly: `delete element.dataset.{1};")
    )]
    Remove(#[label] Span, String),
}

#[derive(Debug, Default, Clone)]
pub struct PreferDomNodeDataset;

declare_oxc_lint!(
    /// ### What it does
    ///
    /// Use [`.dataset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset) on DOM elements over `getAttribute(â€¦)`, `.setAttribute(â€¦)`, `.removeAttribute(â€¦)` and `.hasAttribute(â€¦)`.
    ///
    /// ### Why is thi
    
fn test() {
    use crate::tester::Tester;

    let pass = vec![
        r"element.dataset.unicorn = 'ðŸ¦„';",
        r"element.dataset['unicorn'] = 'ðŸ¦„';",
        r"new element.setAttribute('data-unicorn', 'ðŸ¦„');",
        r"setAttribute('data-unicorn', 'ðŸ¦„');",
        r"element['setAttribute']('data-unicorn', 'ðŸ¦„');",
        r"element[setAttribute]('data-unicorn', 'ðŸ¦„');",
        r"element.foo('data-unicorn', 'ðŸ¦„');",
        r"element.setAttribute('data-unicorn', 'ðŸ¦„', 'extra');",
        r"element.setAttribute('data-unicorn');",
        r"element.setAttribute(...argumentsArray, ...argumentsArray2)",
        r"element.setAttribute(`data-unicorn`, 'ðŸ¦„');",
        r"element.setAttribute(0, 'ðŸ¦„');",
        r"element.setAttribute('foo-unicorn', 'ðŸ¦„');",
        r"element.setAttribute('data', 'ðŸ¦„');",
        r"delete element.dataset.unicorn;",
        r#"delete element.dataset["unicorn"];"#,
        r#"new element.removeAttribute("data-unicorn");"#,
        r#"removeAttribute("data-unicorn");"#,
        r#"element["removeAttribute"]("data-unicorn");"#,
        r#"element[removeAttribute]("data-unicorn");"#,
        r#"element.foo("data-unicorn");"#,
        r#"element.removeAttribute("data-unicorn", "extra");"#,
        r"element.removeAttribute();",
        r"element.removeAttribute(...argumentsArray, ...argumentsArray2)",
        r"element.removeAttribute(`data-unicorn`);",
        r"element.removeAttribute(0);",
        r#"element.removeAttribute("foo-unicorn");"#,
        r#"element.removeAttribute("data");"#,
        r#""unicorn" in element.dataset"#,
        r#"element.dataset.hasOwnProperty("unicorn")"#,
        r#"Object.prototype.hasOwnProperty.call(element.dataset, "unicorn")"#,
        r#"Object.hasOwn(element.dataset, "unicorn")"#,
        r#"Reflect.has(element.dataset, "unicorn")"#,
        r#"new element.hasAttribute("data-unicorn");"#,
        r#"hasAttribute("data-unicorn");"#,
        r#"element["hasAttribute"]("data-unicorn");"#,
        r#"element[hasAttribute]("data-unicorn");"#,
        r#"element.foo("data-unicorn");"#,
        r#"element.hasAttribute("data-unicorn", "extra");"#,
        r"element.hasAttribute();",
        r"element.hasAttribute(...argumentsArray, ...argumentsArray2)",
        r"element.hasAttribute(`data-unicorn`);",
        r"element.hasAttribute(0);",
        r#"element.hasAttribute("foo-unicorn");"#,
        r#"element.hasAttribute("data");"#,
        r"element.dataset.unicorn",
        r#"new element.getAttribute("data-unicorn");"#,
        r#"getAttribute("data-unicorn");"#,
        r#"element["getAttribute"]("data-unicorn");"#,
        r#"element[getAttribute]("data-unicorn");"#,
        r#"element.foo("data-unicorn");"#,
        r#"element.getAttribute("data-unicorn", "extra");"#,
        r"element.getAttribute();",
        r"element.getAttribute(...argumentsArray, ...argumentsArray2)",
        r"element.getAttribute(`data-unicorn`);",
        r"element.getAttribute(0);",
        r#"element.getAttribute("foo-unicorn");"#,
        r#"element.getAttribute("data");"#,
    ];

    let fail = vec![
        r"element.setAttribute('data-unicorn', 'ðŸ¦„');",
        r"element.setAttribute('data-ðŸ¦„', 'ðŸ¦„');",
        r"element.setAttribute('data-ã‚†', 'ã‚†');",
        r"element.setAttribute('data-foo2', 'ðŸ¦„');",
        r"element.setAttribute('data-foo:bar', 'zaz');",
        r#"element.setAttribute("data-foo:bar", "zaz");"#,
        r"element.setAttribute('data-foo.bar', 'zaz');",
        r"element.setAttribute('data-foo-bar', 'zaz');",
        r"element.setAttribute('data-foo', /* comment */ 'bar');",
        r"element.querySelector('#selector').setAttribute('data-AllowAccess', true);",
        r#"element.setAttribute("data-", "ðŸ¦„");"#,
        r#"element.setAttribute("data--foo", "ðŸ¦„");"#,
        r#"element.setAttribute("DATA--FOO", "ðŸ¦„");"#,
        r#"element.setAttribute("DATA- ", "ðŸ¦„");"#,
        r#"element.setAttribute("DATA-Foo-bar", "ðŸ¦„");"#,
        r#"optional?.element.setAttribute("data-unicorn", "ðŸ¦„");"#,
        r#"console.log(element.setAttribute("data-unicorn", "ðŸ¦„"))"#,
        r"element.removeAttribute('data-unicorn');",
        r#"element.removeAttribute("data-unicorn");"#,
        r#"element.removeAttribute("data-unicorn",);"#,
        r#"element.removeAttribute("data-ðŸ¦„");"#,
        r#"element.removeAttribute("data-ã‚†");"#,
        r#"element.removeAttribute("data-foo2");"#,
        r#"element.removeAttribute("data-foo:bar");"#,
        r#"element.removeAttribute("data-foo:bar");"#,
        r#"element.removeAttribute("data-foo.bar");"#,
        r#"element.removeAttribute("data-foo-bar");"#,
        r#"element.removeAttribute("data-foo");"#,
        r##"element.querySelector("#selector").removeAttribute("data-AllowAccess");"##,
        r#"element.removeAttribute("data-");"#,
        r#"optional?.element.removeAttribute("data-unicorn");"#,
        r#"element.removeAttribute("data-unicorn")?.property"#,
        r"element.hasAttribute('data-unicorn');",
        r#"element.hasAttribute("data-unicorn");"#,
        r#"element.hasAttribute("data-unicorn",);"#,
        r#"element.hasAttribute("data-ðŸ¦„");"#,
        r#"element.hasAttribute("data-ã‚†");"#,
        r#"element.hasAttribute("data-foo2");"#,
        r#"element.hasAttribute("data-foo:bar");"#,
        r#"element.hasAttribute("data-foo:bar");"#,
        r#"element.hasAttribute("data-foo.bar");"#,
        r#"element.hasAttribute("data-foo-bar");"#,
        r#"element.hasAttribute("data-foo");"#,
        r##"element.querySelector("#selector").hasAttribute("data-AllowAccess");"##,
        r#"optional?.element.hasAttribute("data-unicorn");"#,
        r#"element.hasAttribute("data-unicorn").toString()"#,
        r"element.getAttribute('data-unicorn');",
        r#"element.getAttribute("data-unicorn");"#,
        r#"element.getAttribute("data-unicorn",);"#,
        r#"element.getAttribute("data-ðŸ¦„");"#,
        r#"element.getAttribute("data-ã‚†");"#,
        r#"element.getAttribute("data-foo2");"#,
        r#"element.getAttribute("data-foo:bar");"#,
        r#"element.getAttribute("data-foo:bar");"#,
        r#"element.getAttribute("data-foo.bar");"#,
        r#"element.getAttribute("data-foo-bar");"#,
        r#"element.getAttribute("data-foo");"#,
        r##"element.querySelector("#selector").getAttribute("data-AllowAccess");"##,
        r#"optional?.element.getAttribute("data-unicorn");"#,
        r#"element.getAttribute("data-unicorn").toString()"#,
    ];

    Tester::new(PreferDomNodeDataset::NAME, pass, fail).test_and_snapshot();
}