Skip to content

feat(codeStyle): enforce top-level-function - #1033

Merged
susnux merged 3 commits into
mainfrom
feat/top-level-function
May 13, 2025
Merged

susnux merged 3 commits into
mainfrom
feat/top-level-function

Conversation

@ShGKme

@ShGKme ShGKme commented May 13, 2025

Copy link
Copy Markdown
Contributor

ShGKme added 3 commits May 13, 2025 19:31
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
@ShGKme
ShGKme requested review from skjnldsv and susnux May 13, 2025 17:34
@ShGKme ShGKme self-assigned this May 13, 2025
@ShGKme ShGKme added enhancement New feature or request 3. to review labels May 13, 2025

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 for the rule
But is there no upstream rule in stylistic? Or something we already use?

@ShGKme

ShGKme commented May 13, 2025

Copy link
Copy Markdown
Contributor Author

But is there no upstream rule in stylistic? Or something we already use?

No :(

There is func-style, but it defines style everywhere, not only on the top level...
https://eslint.org/docs/latest/rules/func-style

And stylistic has only formatting-like rules here.

@ShGKme

ShGKme commented May 13, 2025

Copy link
Copy Markdown
Contributor Author

but the plugin is quite small

@ShGKme
ShGKme requested review from Antreesy and DorraJaouad May 13, 2025 17:45
@susnux
susnux merged commit dc4c624 into main May 13, 2025
@susnux
susnux deleted the feat/top-level-function branch May 13, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Top-level function style

3 participants