Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

fix: precommit lint and format #148

Closed
wants to merge 1 commit into from
Closed

fix: precommit lint and format #148

wants to merge 1 commit into from

Conversation

Bushuo
Copy link
Contributor

@Bushuo Bushuo commented Mar 21, 2023

Ref: #98

These changes seem to work on my end now.
I also added two more npm scripts to be invoked from the CI job.

Could someone please verify it?

Basics

  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildserver is happy.
  • The PR is rebased with current master.

Checklist

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation
  • I fixed all affected decisions
  • I added code comments, logging, and assertions as appropriate
  • I mentioned every code not directly written by me in reuse syntax

Review

@Bushuo Bushuo requested a review from buenaflor March 21, 2023 22:05
Copy link
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

lgtm, I'll try it out today as well

Copy link
Contributor

@Benjaminimal Benjaminimal left a comment

Choose a reason for hiding this comment

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

Looks good.
I've got a few notes though.

  1. I checked out this branch, rebased it on master, and ran npm run lint and got this warning. Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .
    You can silence this if you add the following to .eslintrc.json.
  "settings": {
    "react": {
      "version": "detect"
    }
  }
  1. Could you take a look at the lining errors and maybe fix them? Else we will have a check in the CI soon that always fails.
  2. Please run npm run format, commit it, and add the commit hash with a brief comment to .git-blame-ignore-revs file.
    https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/#ignore-commits-via-%60--ignore-revs-file%60

For 2. and 3. please rebase this branch on master.

Comment on lines +5 to +6
npm run lint-staged
npm run build
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you only split this up but did not write it.
I have heard that people turn this hook off because building the front end on each commit takes too much time.
It would make more sense to get rid of the build part, only run formatting and lining and let the CI make sure the project can build.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, I took care of it with this PR.
#159

@Benjaminimal
Copy link
Contributor

Forget point 3.

Reformatting, however, should be done after Milestone 1 (#35), to not postpone the Milestone.

Seems like Markus wants to wait with it.

@Bushuo
Copy link
Contributor Author

Bushuo commented Mar 23, 2023

@Benjaminimal great work :)
I will close this then

@markus2330
Copy link
Contributor

It can stay open, hopefully we are soon done with the milestone and then we can merge it.

@markus2330 markus2330 reopened this Mar 24, 2023
@markus2330
Copy link
Contributor

Ahh, now I see, it got obsolete because of #160? So I'll close it again.

@markus2330 markus2330 closed this Mar 25, 2023
@markus2330 markus2330 deleted the pb-lint-fmt branch August 26, 2023 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants