use oxc_diagnostics::OxcDiagnostic;
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;

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

#[derive(Debug, Default, Clone)]
pub struct {{pascal_rule_name}};

declare_oxc_lint!(
    /// ### What it does
    ///
    ///
    /// ### Why is this bad?
    ///
    ///
    /// ### Example
    /// ```javascript
    /// ```
    {{pascal_rule_name}},
    nursery, // TODO: change category to `correctness`, `suspicious`, `pedantic`, `perf`, `restriction`, or `style`
             // See <https://oxc.rs/docs/contribute/linter.html#rule-category> for details
             
    pending  // TODO: describe fix capabilities. Remove if no fix can be done,
             // keep at 'pending' if you think one could be added but don't know how.
             // Options are 'fix', 'fix_dangerous', 'suggestion', and 'conditional_fix_suggestion'
);

impl Rule for {{pascal_rule_name}} {
    fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {

    }
}

#[test]
fn test() {
    use crate::tester::Tester;
    {{#if has_filename}}
    use std::path::PathBuf;
    {{/if}}

    let pass = vec![
        {{pass_cases}}
    ];

    let fail = vec![
        {{fail_cases}}
    ];

    {{#if fix_cases}}
    let fix = vec![
        {{fix_cases}}
    ];
    Tester::new({{pascal_rule_name}}::NAME, pass, fail).expect_fix(fix).test_and_snapshot();
    {{else}}
    Tester::new({{pascal_rule_name}}::NAME, pass, fail).test_and_snapshot();
    {{/if}}
}
