Skip to content

Commit

Permalink
activate prettier via fmt:check in ci(#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
josojo authored Nov 28, 2023
1 parent 9ea7638 commit d966d3d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ matrix.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ matrix.os }}-yarn-
- run: yarn --frozen-lockfile
- run: yarn lint
- run: yarn lint
- run: yarn fmt:check
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": ["prettier-plugin-solidity"],
"overrides": [
{
"files": "*.sol",
"options": {
"parser": "solidity-parse",
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"license": "MIT",
"scripts": {
"fmt": "prettier 'contracts/**/*.sol' -w && prettier 'test/**/*.sol' -w",
"fmt:check": "prettier 'contracts/**/*.sol' -c && prettier 'test/**/*.sol' -c",
"lint": "solhint 'contracts/**/*.sol' 'test/**/*.sol'"
},
"dependencies": {
Expand Down

0 comments on commit d966d3d

Please sign in to comment.