6

I just upgrade my app from prettier 1.19.1 to 2.5.1 with eslint-plugin-prettier. But I am facing massive changes inlinter. And I would like to have previous behavior on this rule:

// prettier v1
const [
  currentRouteName,
  currentParams
] = getActiveRoute(currentState);

// prettier v2 - note line break after "="
const [currentRouteName, currentParams] =
  getActiveRoute(currentState);

Is it possible to override this rule that change line break (seems to be related to printWith but this settings haven't change in my .prettierrc) ?

Aure77
  • 3,034
  • 7
  • 33
  • 53
  • Any solution here? Even without destructuring, prettier chops the line like this after the equal sign:`const key = rawOrder._id + "_" + splitFields.join("_");` – Distagon Aug 02 '22 at 09:49
  • 1
    This behavior also makes it impossible to follow the Airbnb JS style guide when it comes to [adding linebreaks before or after an assignment](https://github.com/airbnb/javascript#variables--linebreak). – Thomas Higginbotham Oct 10 '22 at 20:24

0 Answers0