You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ℹ️ 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
+
11
19
A [Prettier](https://prettier.io/) plugin for automatically formatting your [Solidity](https://docs.soliditylang.org/en/latest/) code.
12
20
13
21
## Installation and usage
@@ -380,6 +388,26 @@ contract Foo is Bar {
380
388
381
389
Notice that the unnecessary parentheses in `modifier2` were removed in the function but not in the constructor.
382
390
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`:
0 commit comments