Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 891
    • Issues 891
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 50
    • Merge Requests 50
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds FrontendMinds Frontend
  • Merge Requests
  • !532

Open
Opened 12 hours ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

[Sprint/ModestMonkey](chore): Added linting to pre-commit hook #1807

Closes #1807

To Test

Pull the branch locally, install the new packages, try commit a) unlinted code. b) fit/describes. c) build errors should be caught on push.

Package Justification

I did do some research before this and found Husky (https://github.com/typicode/husky/) suggested as a way to get hooks to run simply cross-platform, nicely. Looking at their project it seems to be robust, actively maintained and used quite widely.

The other package I wanted to use is https://github.com/azz/pretty-quick which seemed the best to quickly lint, without overkilling things. There are packages that support multiple linters, but with Husky this is not needed.

image

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b chore/husky-prettier-1807 origin/chore/husky-prettier-1807

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff chore/husky-prettier-1807

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge chore/husky-prettier-1807 into master
The source branch is 7 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #79499251 passed with warnings for ee564d30 on chore/husky-prettier-1807
              Requires 2 more approvals from Devs and Deployers.
              Mark Harding
              Mark Harding
              Marcelo Rivera
              Marcelo Rivera
              Emiliano Balbuena
              Emiliano Balbuena
              Guy Thouret
              Guy Thouret
              Brian Hatchet
              Brian Hatchet
              Ready to be merged automatically. Ask someone with write access to this repository to merge this request

              Closes #1807

              Deletes source branch

              • Discussion 0
              • Commits 2
              • Pipelines 1
              • Changes 2
              • Loading...
              • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Green scoped labels 12 hours ago

                added MR::Awaiting Review Squad::Green scoped labels

              • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
              Please register or sign in to reply
              0 Assignees
              None
              Assign to
              None
              Milestone
              None
              Assign milestone
              None
              Time tracking
              No estimate or time spent
              2
              Labels
              MR::Awaiting Review Squad::Green
              Assign labels
              • View project labels
              Lock merge request
              Unlocked
              9
              9 participants
              user avatar
              Mark Harding
              user avatar
              Marcelo Rivera
              user avatar
              Emiliano Balbuena
              user avatar
              Guy Thouret
              user avatar
              Brian Hatchet
              user avatar
              Olivia Madrid
              user avatar
              Martin Santangelo
              Reference: minds/front!532