community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

chore(lint-staged): setup precommit hook

Open kuangp opened this issue 1 year ago • 1 comments

Hey, I just made a Pull Request!

I assume we want to setup the same pre-commit lint/prettier enforcement in this repo to ensure consistent formatting?

I saw that a lint-staged section is defined in each workspaces package.json but husky and lint-staged weren't defined as deps and so commits aren't currently being formatted. Did we intend to set this up per workspace in case some might follow different standards?

:heavy_check_mark: Checklist

  • [ ] A changeset describing the change and affected packages. (more info)
  • [ ] Tests for new functionality and regression tests for bug fixes
  • [ ] Screenshots attached (for UI changes)
  • [x] All your commits have a Signed-off-by line in the message. (more info)

kuangp avatar Apr 24 '24 22:04 kuangp

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @backstage-community/plugin-jenkins-backend

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-adr-backend workspaces/adr/plugins/adr-backend patch v0.4.20
@backstage-community/plugin-adr-common workspaces/adr/plugins/adr-common patch v0.2.26
backend workspaces/azure-devops/packages/backend none v0.0.4
@backstage-community/plugin-explore workspaces/explore/plugins/explore patch v0.5.2
app-next workspaces/github-actions/packages/app-next none v0.0.3
app workspaces/github-actions/packages/app none v0.0.3
@backstage-community/plugin-jenkins-backend workspaces/jenkins/plugins/jenkins-backend none v0.4.9
@backstage-community/cli workspaces/repo-tools/packages/cli none v0.0.1
@backstage-community/plugin-vault-backend workspaces/vault/plugins/vault-backend patch v0.4.15

backstage-goalie[bot] avatar May 15 '24 18:05 backstage-goalie[bot]

HI @kuangp, going through the list of old PR, is this still something you'll be working on?

awanlin avatar Jul 04 '24 12:07 awanlin

HI @kuangp, going through the list of old PR, is this still something you'll be working on?

hmm I think I was waiting on some feedback on the recommended direction for this change from @benjdlambert - if this is something the maintainers here are still interested in then I can update this change and bring it to a mergable state

kuangp avatar Jul 04 '24 13:07 kuangp

Hi @benjdlambert, I think we might be waiting on your feedback for this one, can you give it a look?

@kuangp, looks like there's some conflicts, can you fix that, please?

awanlin avatar Jul 23 '24 12:07 awanlin

Sorry missed this whilst I was on vacations - will add this to this list and pick it up for review! :pray:

benjdlambert avatar Jul 23 '24 13:07 benjdlambert

@backstage/community-plugins-maintainers updated this change to setup all workspaces with the precommit hook

As part of this it also uncovered some lint errors which I've fixed and created changesets patches where necessary

It also looks like some workspaces are failing in the CI due to being on an older version of Backstage/backstage-cli which does not have the --publish flag the CI is trying to run - not sure how to address that? or if we want to just go ahead and merge anyways (which will require a repo admin to force merge)

kuangp avatar Jul 24 '24 20:07 kuangp

@kuangp I was going to give version bumping the other plugins another go but looks like I broke the path to the script I recently added to generate a changeset during the version bump workflow so I can't do that till it's fixed.

I'm of the opinion that if this looks sound to others then we merge it.

awanlin avatar Jul 24 '24 22:07 awanlin

@kuangp I was going to give version bumping the other plugins another go but looks like I broke the path to the script I recently added to generate a changeset during the version bump workflow so I can't do that till it's fixed.

I'm of the opinion that if this looks sound to others then we merge it.

one more to go! 🙏

kuangp avatar Jul 26 '24 22:07 kuangp

OK, all the plugins are done. As repo-tools is actually not a plugin but tools for this repo I'm not sure what we should do. 🤔

awanlin avatar Jul 27 '24 12:07 awanlin

@awanlin I manually updated the deps for repo-tools to get the CI passing - care to double check my work ? 🙂

kuangp avatar Jul 29 '24 15:07 kuangp

@backstage/community-plugins-maintainers someone mind taking another quick look over the latest changes before we merge?

kuangp avatar Aug 14 '24 17:08 kuangp