diff --git a/crates/oxc_linter/src/rules/eslint/no_empty_function.rs b/crates/oxc_linter/src/rules/eslint/no_empty_function.rs index aa1981abebb66..b5443e278197a 100644 --- a/crates/oxc_linter/src/rules/eslint/no_empty_function.rs +++ b/crates/oxc_linter/src/rules/eslint/no_empty_function.rs @@ -106,15 +106,22 @@ declare_oxc_lint!( /// Empty functions can reduce readability because readers need to guess whether it's /// intentional or not. So writing a clear comment for empty functions is a good practice. /// - /// ### Configuration - /// You may pass an object containing a list of `allow`ed function kinds. - /// For example: + /// ### Options + /// + /// #### allow + /// + /// `{ type: string[], default: [] }` + /// + /// You may pass a list of allowed function kinds, which will allow functions of + /// these kinds to be empty. + /// + /// Example: /// ```json - /// // oxlint.json /// { - /// "rules": { - /// "no-empty-function": ["error", { "allow": ["functions"] }] - /// } + /// "no-empty-function": [ + /// "error", + /// { "allow": ["functions"] } + /// ] /// } /// ``` /// @@ -157,7 +164,7 @@ declare_oxc_lint!( /// } /// /// function foo() { - /// return; + /// return; /// } /// const add = (a, b) => a + b ///