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: support more fields of packageJson as ascending order #359

Merged
merged 1 commit into from Mar 21, 2024

Conversation

mutoe
Copy link
Contributor

@mutoe mutoe commented Dec 11, 2023

Description

These are the sort fields I usually use, and you can decide what rules are needed of the project. You can modify them directly or bring them up. Happy to contribute :)

  • scripts
  • hooks (gitHooks, husky, simple-git-hooks)
  • eslintConfig
  • stylelint

Linked Issues

-

Additional context

-

@mutoe
Copy link
Contributor Author

mutoe commented Dec 11, 2023

Emmm, I'm not sure why it failed under windows and the other platforms passed, it doesn't look like a rule issue 🧐

Copy link
Owner

@antfu antfu 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 for working it, tho I am not sure to have them.

src/configs/sort.ts Outdated Show resolved Hide resolved
src/configs/sort.ts Outdated Show resolved Hide resolved
@mutoe
Copy link
Contributor Author

mutoe commented Dec 11, 2023

Got it, already exclude script and lint properties of ascending order

'pre-push',
'pre-auto-gc',
],
pathPattern: '^(?:gitHooks|husky|simple-git-hooks)$',
Copy link
Owner

Choose a reason for hiding this comment

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

I am not sure whether to have this tool-specific configuration either... Also, how is this order decided?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It comes from official git hooks page https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

@antfu antfu merged commit f4765b1 into antfu:main Mar 21, 2024
5 checks passed
@mutoe mutoe deleted the package-json-misc-order branch March 23, 2024 05:28
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.

None yet

2 participants