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

Forces linter check before commit #224

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run formatCheck
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"scripts": {
"format": "prettier . --write"
"format": "prettier . --write",
"formatCheck": "prettier . --check",
"prepare": "husky install"
},
"devDependencies": {
"husky": "^8.0.3",
"prettier": "3.0.3"
}
}
6 changes: 1 addition & 5 deletions src/ch02-11-foundry-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ tree . -L 1

The project structure is as follows:


```shell
.
├── README.md
Expand Down Expand Up @@ -118,7 +117,6 @@ Tests: 3 passed, 0 failed, 0 skipped

Run specific tests using a filter string after the `snforge` command. Tests matching the filter based on their absolute module tree path will be executed:


```shell
$ snforge calling
```
Expand All @@ -127,7 +125,6 @@ $ snforge calling

Use the `--exact` flag and a fully qualified test name to run a particular test:


```shell
snforge package_name::calling --exact
```
Expand Down Expand Up @@ -166,7 +163,6 @@ mod HelloStarknet {
}

// Returns the balance.

fn get_balance(self: @ContractState) -> felt252 {
self.balance.read()
}
Expand Down Expand Up @@ -212,4 +208,4 @@ Collected 1 test(s) from using_dispatchers package
Running 1 test(s) from src/
[PASS] using_dispatchers::call_and_invoke
Tests: 1 passed, 0 failed, 0 skipped
```
```
Loading