Closed omarish closed 3 years ago
@omarish is it possible to exclude files when running prettier? This appears to be a general improvement to style, but I think that it makes certain things worse, like the interface files. They go from being easy-to-skim function definitions to something far more unruly.
Yeah, absolutely. You can add a .prettierignore
file with filename patterns you'd like to ignore.
Too many conflicts, and the repo is being mostly archived.
Makes sense! I'm really impressed w/what you guys have built here. 💪
I was reading through the YieldSpace implementation (very nicely done, btw) and noticed a couple small formatting inconsistencies, so this PR adds and enables these formatting plugins:
"prettier-plugin-solidity": "^1.0.0-alpha.60",
"solhint-plugin-prettier": "^0.0.5"
This PR also adds another task to
package.json
:prettier:sol
which will run all solidity code through prettier and write the formatted version. I would have named itlint:sol
but that task name is already taken bysolhint
.Finally, this PR touches a lot of solidity code and I haven't had a chance to look through very closely and make sure nothing was inadvertently changed by
prettier
(i.e if there's a bug in prettier that changes some solidity functionality by mistake). Ran the test suite and it's all passing.