File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed
Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 22
33work in progress [ prettier plugin] ( https://github.com/prettier/prettier/issues/4180 ) for [ solidity] ( https://github.com/ethereum/solidity )
44
5- ## Resources
5+ ## Installation and usage
66
7- - https://github.com/ prettier-solidity/ prettier-plugin-solidity/issues/2
7+ Install both ` prettier ` and ` prettier-plugin-solidity ` :
88
9- ## Test
10-
11- ``` bash
12- node_modules/.bin/prettier --write ** /* .sol --plugin=./src
9+ ```
10+ npm install --save-dev prettier prettier-plugin-solidity
1311```
1412
15- ## Use
13+ You can add a script for running prettier on all your contracts:
1614
17- ``` bash
18- node_modules/.bin/ prettier --write ** /* .sol --plugin=./node_modules/prettier-plugin-solidity
15+ ```
16+ " prettier": "prettier --write **/*.sol"
1917```
2018
21- ## Install
19+ Or you can use it as part of your linting to check that all your code is prettified:
2220
23- ``` bash
24- npm install prettier-solidity/prettier-plugin-solidity
21+ ```
22+ "lint": " prettier --list-different **/*.sol"
2523```
Original file line number Diff line number Diff line change 11{
22 "name" : " prettier-plugin-solidity" ,
3- "version" : " 1.0.0-alpha.4 " ,
3+ "version" : " 1.0.0-alpha.5 " ,
44 "description" : " prettier plugin for solidity" ,
55 "main" : " src" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments