Skip to content

[prettier-plugin-pkg] "pre" and "post" scripts #403

Closed

Description

@sosoba

Currently the plugin treats all scripts as independent and sorts them alphabetically. This does not well represent the idea of ​​npm where the prefix "before" and "after" have specific meanings. Ex.

"scripts": {
  "test": "node --test",
  "preversion" :"tsc && npm run test",
  "version": "npm publish",
  "postversion": "git push --tags"
}

has currently order that does not reflect reality:

"scripts": {
  "postversion": "git push --tags",
  "preversion" :"tsc && npm run test",
  "test": "node --test",
  "version": "npm publish"
}

I suggest to parameterizing this action.

Activity

  1. JounQin commented on Feb 20, 2025

    @JounQin
    Member

    I like this idea personally, PR welcome if you have time to contribute.

  2. added
    enhancement
    help wanted
    on Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR welcomeenhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions