Skip to content

Commit 9d38cde

Browse files
committed
feat(rulegen): add fix capabilities to new rule template
1 parent 4649ac1 commit 9d38cde

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tasks/rulegen/template.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ use oxc_diagnostics::OxcDiagnostic;
22
use oxc_macros::declare_oxc_lint;
33
use oxc_span::Span;
44

5-
use crate::{context::LintContext, rule::Rule, AstNode};
5+
use crate::{
6+
context::LintContext,
7+
fixer::{RuleFixer, RuleFix},
8+
rule::Rule,
9+
AstNode
10+
};
611

712
#[derive(Debug, Default, Clone)]
813
pub struct {{pascal_rule_name}};
@@ -20,6 +25,10 @@ declare_oxc_lint!(
2025
{{pascal_rule_name}},
2126
nursery, // TODO: change category to `correctness`, `suspicious`, `pedantic`, `perf`, `restriction`, or `style`
2227
// See <https://oxc.rs/docs/contribute/linter.html#rule-category> for details
28+
29+
pending // TODO: describe fix capabilities. Remove if no fix can be done,
30+
// keep at 'pending' if you think one could be added but don't know how.
31+
// Options are 'fix', 'fix-dangerous', 'suggestion', and 'suggestion-dangerous'
2332
);
2433

2534
impl Rule for {{pascal_rule_name}} {

0 commit comments

Comments
 (0)