Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hooks configuration #8

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repos:
- repo: local
hooks:
- id: lint-sol
name: "lint core sol"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:sol"
files: '\.sol$'
language: script
description: "Checks solidity code according to the package's linter configuration"
- id: lint-js
name: "lint core ts/js"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:js"
files: '\.(ts|js)$'
language: script
description: "Checks TS/JS code according to the package's linter configuration"
- id: lint-config
name: "lint core json/yaml"
entry: /usr/bin/env bash -c "cd core/ && npm run lint:config"
files: '\.(json|yaml)$'
language: script
description: "Checks JSON/YAML code according to the package's linter configuration"
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# litmus
Bitcoin Liquid Staking

# Development

## Pre-commit Hooks

Developers are encouraged to use [pre-commit](https://pre-commit.com/) hooks to
automatically discover code issues, before they submit the code.

To setup the hooks follow the steps:

1. Install `pre-commit` tool:
```sh
brew install pre-commit
```

2. Install the hooks for the repository:
```sh
pre-commit install
```