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

Feature: sort items shared a same length after sort by line-length #429

Open
2 tasks done
ntnyq opened this issue Dec 22, 2024 · 3 comments
Open
2 tasks done

Feature: sort items shared a same length after sort by line-length #429

ntnyq opened this issue Dec 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ntnyq
Copy link

ntnyq commented Dec 22, 2024

What rule do you want to change?

any rule

Describe the problem

I checked docs of sort-exports and didn't found any option to make it possible to sort items shared a same length to a certain order after sort by line-length.

May be we should add a new option?

Code example

export * from './sortAttrs'
export * from './prefixIds'
export * from './cleanupIds'
export * from './mergePaths'
export * from './removeDesc'
export * from './reusePaths'
export * from './removeTitle'
export * from './mergeStyles'
export * from './removeXMLNS'
export * from './removeXlink'
export * from './removeAttrs'
export * from './inlineStyles'
export * from './cleanupAttrs'
export * from './minifyStyles'
export * from './convertColors'
export * from './presetDefault'
export * from './removeDoctype'
export * from './removeViewBox'
export * from './removeComments'
export * from './removeMetadata'
export * from './collapseGroups'
export * from './removeUnusedNS'
export * from './removeEmptyText'
export * from './convertPathData'
export * from './removeDimensions'
export * from './convertTransform'
export * from './sortDefsChildren'
export * from './removeEmptyAttrs'
export * from './removeHiddenElems'
export * from './removeUselessDefs'
export * from './removeXMLProcInst'
export * from './removeStyleElement'
export * from './removeRasterImages'
export * from './convertShapeToPath'
export * from './removeEditorsNSData'
export * from './convertStyleToAttrs'
export * from './removeEditorsNSData'
export * from './removeScriptElement'
export * from './cleanupListOfValues'
export * from './removeElementsByAttr'
export * from './cleanupNumericValues'
export * from './removeOffCanvasPaths'
export * from './moveElemsAttrsToGroup'
export * from './moveGroupAttrsToElems'
export * from './removeDeprecatedAttrs'
export * from './removeEmptyContainers'
export * from './convertEllipseToCircle'
export * from './addClassesToSVGElement'
export * from './convertOneStopGradients'
export * from './cleanupEnableBackground'
export * from './removeUnknownsAndDefaults'
export * from './addAttributesToSVGElement'
export * from './removeUselessStrokeAndFill'
export * from './removeAttributesBySelector'
export * from './removeNonInheritableGroupAttrs'

Additional comments

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@ntnyq ntnyq added the enhancement New feature or request label Dec 22, 2024
@ntnyq ntnyq changed the title How can I sort items shared a same length after sort by line-length Feature: sort items shared a same length after sort by line-length Dec 22, 2024
@hugop95
Copy link
Contributor

hugop95 commented Dec 22, 2024

The current behavior is to allow the user to place same-length items in the order that they want, I think that we should keep that by default.

I don't think that there is a need to add a complex fallback sorting behavior for items with the same length. I assume that most use cases would be to sort items of the same length alphabetically?

@ntnyq
Copy link
Author

ntnyq commented Dec 22, 2024

Yeah, I prefer to sort same length items alphabetically too. But currently the plugin just leave it as it is.

@hugop95
Copy link
Contributor

hugop95 commented Dec 23, 2024

I'll see what's the best way to integrate such an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants