Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sort-objects): adds array-based customGroups option #438

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

hugop95
Copy link
Contributor

@hugop95 hugop95 commented Jan 3, 2025

Resolves #436

Description

Adds the grouping system of sort-object-types to sort-objects, including the array-based customGroups option.

This is quite similar to what was done in #396.

Groups

Selectors

Ordered from most to least important.

  • methods: method, member.
  • properties: property, member.
  • multiline: This selector is deprecated: it allows users to keep using the multiline group, but the multiline modifier should be used instead (multiline-member group, for example).

Modifiers

multiline.

Custom groups option

  • elementNamePattern.
  • elementValuePattern as requested here. Disabled for functions and arrow function values.

What is the purpose of this pull request?

  • New Feature

@hugop95 hugop95 force-pushed the feat/sort-objects/array-based-custom-groups branch 7 times, most recently from 7004d0c to d068276 Compare January 7, 2025 11:43
@hugop95 hugop95 force-pushed the feat/sort-objects/array-based-custom-groups branch from d068276 to d3a5a67 Compare January 8, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: any options to sort the objects like expected?
1 participant