From c8580b48f2afc552c76a8f8761e825feb51997dc Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 20 Oct 2025 23:06:41 -0600 Subject: [PATCH] docs(linter): Add doc comments for func_style options. This one is a bit weird in that there's an overrides > namedExports option that's nested? But the struct doesn't appear to quite match that expectation. Also, the struct doesn't quite match the fact that there's no key for `style`, it's just a string value at the top level. --- crates/oxc_linter/src/rules/eslint/func_style.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/oxc_linter/src/rules/eslint/func_style.rs b/crates/oxc_linter/src/rules/eslint/func_style.rs index 6f7f9a41266da..566169dbaf939 100644 --- a/crates/oxc_linter/src/rules/eslint/func_style.rs +++ b/crates/oxc_linter/src/rules/eslint/func_style.rs @@ -57,9 +57,13 @@ impl From<&str> for NamedExports { #[derive(Debug, Default, Clone, Deserialize, Serialize, JsonSchema)] #[serde(rename_all = "camelCase", default)] pub struct FuncStyle { + /// The style to enforce. Either "expression" (default) or "declaration". style: Style, + /// When true, arrow functions are allowed regardless of the style setting. allow_arrow_functions: bool, + /// When true, functions with type annotations are allowed regardless of the style setting. allow_type_annotation: bool, + /// Override the style specifically for named exports. Can be "expression", "declaration", or "ignore" (default). named_exports: Option, }