chore(lint-staged): setup precommit hook
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
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 |
HI @kuangp, going through the list of old PR, is this still something you'll be working on?
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
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?
Sorry missed this whilst I was on vacations - will add this to this list and pick it up for review! :pray:
@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 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.
@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! 🙏
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 I manually updated the deps for repo-tools to get the CI passing - care to double check my work ? 🙂
@backstage/community-plugins-maintainers someone mind taking another quick look over the latest changes before we merge?