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: scope.rs
    path of file: ./repos/oxc/crates/oxc_linter/src/rules/jsx_a11y
    
    the code of the file until where you have to start completion: use oxc_ast::{ast::JSXAttributeItem, AstKind};
use oxc_diagnostics::{
    miette::{self, Diagnostic},
    thiserror::Error,
};
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;

use crate::{
    context::LintContext,
    globals::HTML_TAG,
    rule::Rule,
    utils::{get_element_type, has_jsx_prop_lowercase},
    AstNode,
};

#[derive(Debug, Error, Diagnostic)]
#[error("eslint-plugin-jsx-a11y(scope): The scope prop can only be used on <th> elements")]
#[diagnostic(severity(warning), help("Must use scope prop only on <th> elements"))]
struct ScopeDiagnostic(#[label] pub Span);

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

declare_oxc_lint!(
    /// ### What it does

    
    fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
        let AstKind::JSXOpeningElement(jsx_el) = node.kind() else {
            return;
        };

        let scope_attribute = match has_jsx_prop_lowercase(jsx_el, "scope") {
            Some(v) => match v {
                JSXAttributeItem::Attribute(attr) => attr,
                JSXAttributeItem::SpreadAttribute(_) => {
                    return;
                }
            },
            None => {
                return;
            }
        };

        let Some(element_type) = get_element_type(ctx, jsx_el) else {
            return;
        };

        if element_type == "th" {
            return;
        }

        if !HTML_TAG.contains(&element_type) {
            return;
        }

        ctx.diagnostic(ScopeDiagnostic(scope_attribute.span));
    }