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 4 times, most recently from fc39d7b to 58f3707 Compare January 3, 2025 21:44
@hugop95 hugop95 force-pushed the feat/sort-objects/array-based-custom-groups branch from 58f3707 to 419d8cd Compare January 5, 2025 18:48
@hugop95 hugop95 force-pushed the feat/sort-objects/array-based-custom-groups branch from 419d8cd to 7004d0c Compare January 5, 2025 19:14
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