Skip to content

Commit

Permalink
feat(linter): implement func-style rule (#8977)
Browse files Browse the repository at this point in the history
This feature is primarily used to supplement eslint func-style, the test
case passed completely, some of the code has the possibility of
optimization, so members need to review my implementation

-
doc:[https://eslint.org/docs/latest/rules/func-style](https://eslint.org/docs/latest/rules/func-style)
-
code:[https://github.com/eslint/eslint/blob/main/lib/rules/func-style.js](https://github.com/eslint/eslint/blob/main/lib/rules/func-style.js)
-
test:[https://github.com/eslint/eslint/blob/main/tests/lib/rules/func-style.js](https://github.com/eslint/eslint/blob/main/tests/lib/rules/func-style.js)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
huangtiandi1999 and autofix-ci[bot] authored Feb 12, 2025
1 parent 157e1a1 commit d93bf0e
Show file tree
Hide file tree
Showing 3 changed files with 643 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ mod eslint {
pub mod eqeqeq;
pub mod for_direction;
pub mod func_names;
pub mod func_style;
pub mod getter_return;
pub mod guard_for_in;
pub mod init_declarations;
Expand Down Expand Up @@ -542,6 +543,7 @@ oxc_macros::declare_all_lint_rules! {
eslint::default_param_last,
eslint::eqeqeq,
eslint::for_direction,
eslint::func_style,
eslint::func_names,
eslint::getter_return,
eslint::guard_for_in,
Expand Down
Loading

0 comments on commit d93bf0e

Please sign in to comment.