Skip to content

formatter: Diff with Prettier on higher order component #16255

@PeterCardenas

Description

@PeterCardenas

Input

const xxxxxxxxxxxxxxxxxxxxxxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxxx('xxxxxxxxxxxxx')((
  props: xxxxxxxxxxxxx,
) => {
  // test
});

Config

{
  "printWidth": 100,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": true,
  "quoteProps": "as-needed",
  "jsxSingleQuote": false,
  "trailingComma": "all",
  "bracketSpacing": true,
  "bracketSameLine": false,
  "arrowParens": "always"
}

Oxfmt output

Oxfmt version: 42e9dcc7d

const xxxxxxxxxxxxxxxxxxxxxxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxxx('xxxxxxxxxxxxx')(
  (props: xxxxxxxxxxxxx) => {
    // test
  },
);

Oxfmt playground link

No response

Prettier output

Prettier version: 3.7.1

const xxxxxxxxxxxxxxxxxxxxxxxxx = xxxxxxxxxxxxxxxxxxxxxxxxxxx('xxxxxxxxxxxxx')((
  props: xxxxxxxxxxxxx,
) => {
  // test
});

Prettier playground link

No response

Additional notes

interesting if the x('x') part turns into just xs, it becomes the same as oxfmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-formatter-prettier-diffArea - Formatter difference with PrettierPrettier bugThis is a Prettier bug rather than `Oxfmt`

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions