Skip to content

Conversation

@connorshea
Copy link
Collaborator

@connorshea connorshea commented Oct 21, 2025

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.

Part of #14743.

Generated docs:

## Configuration

This rule accepts a configuration object with the following properties:

### allowArrowFunctions

type: `boolean`

default: `false`

When true, arrow functions are allowed regardless of the style setting.


### allowTypeAnnotation

type: `boolean`

default: `false`

When true, functions with type annotations are allowed regardless of the style setting.


### style

type: `"expression" | "declaration"`

default: `"expression"`

The style to enforce. Either "expression" (default) or "declaration".

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.
Copilot AI review requested due to automatic review settings October 21, 2025 05:07
@connorshea connorshea requested a review from camc314 as a code owner October 21, 2025 05:07
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 21, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the A-linter Area - Linter label Oct 21, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation comments to the FuncStyle configuration struct fields, improving code documentation for the func_style linter rule. The comments describe each configuration option's purpose and allowed values.

  • Added doc comments for all four fields in the FuncStyle struct
  • Documentation aligns with ESLint's func-style rule configuration options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Oct 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 21, 2025

CodSpeed Performance Report

Merging #14847 will not alter performance

Comparing connorshea:func-style-docs (c8580b4) with main (aa024d9)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@camc314 camc314 merged commit 1665ab4 into oxc-project:main Oct 21, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants