File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
tasks/website/src/linter/rules Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub struct RuleTableRow {
2828
2929 pub turned_on_by_default : bool ,
3030 pub autofix : RuleFixMeta ,
31+ pub is_tsgolint_rule : bool ,
3132}
3233
3334impl Default for RuleTable {
@@ -65,6 +66,7 @@ impl RuleTable {
6566 category : rule. category ( ) ,
6667 turned_on_by_default : default_rules. contains ( name) ,
6768 autofix : rule. fix ( ) ,
69+ is_tsgolint_rule : rule. is_tsgolint_rule ( ) ,
6870 }
6971 } )
7072 . collect :: < Vec < _ > > ( ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ impl Context {
3939 turned_on_by_default,
4040 autofix,
4141 category,
42+ is_tsgolint_rule,
4243 } = rule;
4344 let resolved =
4445 schema. as_ref ( ) . map ( |schema| self . schemas . dereference ( schema) . unwrap_or ( schema) ) ;
@@ -71,6 +72,13 @@ const source = `{}`;
7172 p. writeln ( r#"<span class="emoji">✅</span> This rule is turned on by default."# )
7273 } ) ?;
7374 }
75+ if * is_tsgolint_rule {
76+ p. Alert ( r#"type="info""# , |p| {
77+ p. writeln (
78+ r#"<span class="emoji">💭</span> This rule requires <a href="https://oxc.rs/docs/guide/usage/linter/type-aware.html" target="_blank" rel="noreferrer">type information</a>."#
79+ )
80+ } ) ?;
81+ }
7482
7583 if let Some ( emoji) = autofix. emoji ( ) {
7684 p. Alert ( r#"class="fix" type="info""# , |p| {
You can’t perform that action at this time.
0 commit comments