Skip to content

Commit dbdbe75

Browse files
committed
feat(linter): impl only-export-components to react rules
1 parent 1337811 commit dbdbe75

File tree

4 files changed

+1073
-0
lines changed

4 files changed

+1073
-0
lines changed

crates/oxc_linter/src/generated/rule_runner_impls.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,10 @@ impl RuleRunner for crate::rules::react::no_unknown_property::NoUnknownProperty
17641764
Some(&AstTypesBitset::from_types(&[AstType::JSXOpeningElement]));
17651765
}
17661766

1767+
impl RuleRunner for crate::rules::react::only_export_components::OnlyExportComponents {
1768+
const NODE_TYPES: Option<&AstTypesBitset> = None;
1769+
}
1770+
17671771
impl RuleRunner for crate::rules::react::prefer_es6_class::PreferEs6Class {
17681772
const NODE_TYPES: Option<&AstTypesBitset> = None;
17691773
}

crates/oxc_linter/src/rules.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ pub(crate) mod react {
367367
pub mod no_string_refs;
368368
pub mod no_unescaped_entities;
369369
pub mod no_unknown_property;
370+
pub mod only_export_components;
370371
pub mod prefer_es6_class;
371372
pub mod react_in_jsx_scope;
372373
pub mod require_render_return;
@@ -1014,6 +1015,7 @@ oxc_macros::declare_all_lint_rules! {
10141015
react::no_string_refs,
10151016
react::no_unescaped_entities,
10161017
react::no_unknown_property,
1018+
react::only_export_components,
10171019
react::prefer_es6_class,
10181020
react::react_in_jsx_scope,
10191021
react::require_render_return,

0 commit comments

Comments
 (0)