File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 88 <img width =" 375 " height =" 375 " src =" https://user-images.githubusercontent.com/1022054/59317198-f1149b80-8d15-11e9-9b0f-0c5e7d4b8b81.png " >
99</p >
1010
11+ > ℹ️ This README is for the new major version of Prettier Plugin Solidity.
12+ >
13+ > The differences from v1 are minimal, but there are some breaking changes.
14+ >
15+ > To migrate from v1, follow the [ migration guide] ( #migrating-from-v1 ) .
16+ >
17+ > If you're looking for the previous version, check out the [ v1 branch] ( https://github.com/prettier-solidity/prettier-plugin-solidity/tree/v1 ) .
18+
1119A [ Prettier] ( https://prettier.io/ ) plugin for automatically formatting your [ Solidity] ( https://docs.soliditylang.org/en/latest/ ) code.
1220
1321## Installation and usage
@@ -380,6 +388,26 @@ contract Foo is Bar {
380388
381389Notice that the unnecessary parentheses in ` modifier2 ` were removed in the function but not in the constructor.
382390
391+ ## Migrating from v1
392+
393+ In most cases, upgrading to v2 of Prettier Solidity should be as easy as installing the latest version:
394+
395+ ``` bash
396+ npm install prettier-plugin-solidity@latest
397+ ```
398+
399+ If you had the parser explicitly set in your config, you'll get this error:
400+
401+ ```
402+ [error] Couldn't resolve parser "solidity-parse".
403+ ```
404+
405+ To fix it, simply update the ` parser ` option in your ` .prettierrc ` :
406+
407+ ```
408+ "parser": "slang",
409+ ```
410+
383411## Contributing
384412
3854131 . [ Fork it] ( https://github.com/prettier-solidity/prettier-plugin-solidity/fork )
You can’t perform that action at this time.
0 commit comments