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

Conversation

benceharomi
Copy link
Contributor

What ❔

Create pre-commit and pre-push githooks for the era-contracts and era-system-contracts repositories.

Steps:

  1. create a pre-commit hook that runs the prettier:check command to prohibit committing unformatted code
  2. create a pre-push hook that runs the lint:check command to prohibit pushing unlinted code
  3. make sure that in the era-system-contracts repository, the hooks check both the ethereum and zksync directories
  4. Make sure that:
  • the hooks are added to the .githooks directory
  • the hooks directory is set to be .githooks: git config core.hooksPath .githooks/
  • the files named pre-commit and pre-push
  • the files are executable: chmod +x file

Why ❔

Currently, the formatting and linting has to be run manually, that can be easily forgotten, create githooks that run these automatically!

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@benceharomi benceharomi changed the title Bh evm 314 create githooks to check formatting and linting chore: create githooks to check formatting and linting Oct 31, 2023
@benceharomi benceharomi merged commit 41f51f9 into bh-evm-294-synchronise-linting-rules-of-repositories Oct 31, 2023
8 checks passed
@benceharomi benceharomi deleted the bh-evm-314-create-githooks-to-check-formatting-and-linting branch October 31, 2023 11:39
StanislavBreadless pushed a commit that referenced this pull request Nov 2, 2023
* chore: command name changes

* lint(calculate-hashes): fix

* fix: lint:md command

* chore: package.json commands alphabetical order

* lint: using @matterlabs/eslint-config-typescript and "@matterlabs/prettier-config

* style: prettier:fix

* lint: lint:fix

* Revert "lint: lint:fix"

This reverts commit 15993b2.

* lint: eslint rules turned off

* lint: lint:fix with new rules

* chore: .eslintignore removed

* chore: create githooks to check formatting and linting  (#56)

* chore: pre-commit and pre-push hooks added

* docs: removed yarn lint from PR template

* Revert "chore: package.json commands alphabetical order"

This reverts commit e39a52c.
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.

1 participant