-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit hooks configuration (#8)
The pre-commit hooks are used to run code formatting checks before the code is submitted to the repository with `git commit` command. To setup the hooks follow the steps: 1. Install `pre-commit` tool: ```sh brew install pre-commit ``` 3. Install the hooks for the repository: ```sh pre-commit install ```
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |