Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 9, 2025

This PR contains the following updates:

Package Change Age Confidence
prettier-plugin-solidity 2.0.0 -> 2.1.0 age confidence

Release Notes

prettier-solidity/prettier-plugin-solidity (prettier-plugin-solidity)

v2.1.0

Compare Source

What's Changed

API Changes
Format Changes
  • Only break import deconstruction if the list of items is longer than 1. by @​Janther in #​1178
// Original
import { Item } from "../../../contracts/very/long/path/to/File1.sol";
import { Item1, Item2 } from "../../../contracts/very/long/path/to/File2.sol";

// version 2.0.0
import {
    Item
} from "../../../contracts/very/long/path/to/File.sol";
import {
    Item1,
    Item2
} from "../../../contracts/very/long/path/to/File2.sol";

// version 2.1.0
import { Item } from "../../../contracts/very/long/path/to/File.sol";
import {
    Item1,
    Item2
} from "../../../contracts/very/long/path/to/File2.sol";
  • New rules added to the grouping in a single line when possible and indentation when the line breaks on binary operations to improve readability and make operations precedence more visible. by @​Janther in #​1133
// Original
x = veryLongNameA * veryLongNameB + veryLongNameC;
x = veryLongNameA + veryLongNameB * veryLongNameC;

x = veryVeryLongNameA * veryVeryLongNameB + veryVeryLongNameC;
x = veryVeryLongNameA + veryVeryLongNameB * veryVeryLongNameC;

// version 2.0.0
x =
    veryLongNameA *
    veryLongNameB +
    veryLongNameC;
x =
    veryLongNameA +
    veryLongNameB *
    veryLongNameC;

x =
    veryVeryLongNameA *
    veryVeryLongNameB +
    veryVeryLongNameC;
x =
    veryVeryLongNameA +
    veryVeryLongNameB *
    veryVeryLongNameC;

// version 2.1.0
x =
    veryLongNameA * veryLongNameB +
    veryLongNameC;
x =
    veryLongNameA +
    veryLongNameB * veryLongNameC;

x =
    veryVeryLongNameA *
        veryVeryLongNameB +
    veryVeryLongNameC;
x =
    veryVeryLongNameA +
    veryVeryLongNameB *
        veryVeryLongNameC;
  • Fixed a format issue where a small operand would be left in a new line if the right operand breaks in an assignment. by @​Janther in #​1161
// Original
a = veryVeryVeryVeryVeryLongFunctionCalledA(veryVeryVeryVeryVeryLongArgumentCalledB) ** c;

// version 2.0.0
a =
    veryVeryVeryVeryVeryLongFunctionCalledA(
        veryVeryVeryVeryVeryLongVariableCalledB
    ) **
    c;

// version 2.1.0
a =
    veryVeryVeryVeryVeryLongFunctionCalledA(
        veryVeryVeryVeryVeryLongVariableCalledB
    ) ** c;
  • Added parentheses on consecutive equality operators to improve readability in operation precedence. by @​Janther in #​1132
// Original
a == b == c;
a != b == c;

// version 2.0.0
a == b == c;
a != b == c;

// version 2.1.0
(a == b) == c;
(a != b) == c;
// Original
struct A {
    uint a;
    uint b;
    // uint c; // commented because I decided to test something
}

// version 2.0.0
struct A {
    uint a;
    uint b;
}
// uint c; // commented because I decided to test something

// version 2.1.0
struct A {
    uint a;
    uint b;
    // uint c; // commented because I decided to test something
}
Breaking Changes

New Contributors

Full Changelog: prettier-solidity/prettier-plugin-solidity@v2.0.0...v2.1.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants