Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tasks/rulegen/template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ use oxc_diagnostics::OxcDiagnostic;
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;

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

#[derive(Debug, Default, Clone)]
pub struct {{pascal_rule_name}};
Expand All @@ -20,6 +25,10 @@ declare_oxc_lint!(
{{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 'suggestion-dangerous'
);

impl Rule for {{pascal_rule_name}} {
Expand Down