v1.0.0-rc.1
This is our first release candidate for a stable v1.0.0!
This version includes some significant changes:
- We removed the
explicitTypes
option, since we believe that this belongs to a linter. The behavior now is the same one that you would get if usingexplicitTypes: "preserve"
, meaning that we'll never convert anuint
to anuint256
or vice versa. - In previous versions, the parameters of a function definition would always be split if there were more than two of them. Starting now, we only split them if the line doesn't fit in
line-width
. Plus, the way this works is that first the parameters are split, then the modifiers (if they also don't fit in a single line), and finally the return parameters (also only if they don't fit). - The exponentiation operator (
**
) now has spaces around it. This is more consistent with other operators, and it looks better for long variable names (that is,base ** decimals
is better thanbase**decimals
). We do know that this is not as nice for some cases (2 ** 10
), but we are erring on the side of consistency and a better worst-case scenario.
As an example, a function like this:
contract Foo {
function f(uint x, uint y, uint z) mod1 mod2 { x**y**z; }
}
would be formatted in the previous version like this:
contract Foo {
function f(
uint256 x,
uint256 y,
uint256 z
) mod1 mod2 {
x**y**z;
}
}
and now it will be formatted like this:
contract Foo {
function f(uint x, uint y, uint z) mod1 mod2 {
x ** y ** z;
}
}
Please upgrade to the latest version and let us if you find any issues!