Skip to content

Instantly share code, notes, and snippets.

@jurosh
Last active November 20, 2023 19:39
Show Gist options
  • Select an option

  • Save jurosh/eb0b10cdfa45c61ba99f6a441b316c21 to your computer and use it in GitHub Desktop.

Select an option

Save jurosh/eb0b10cdfa45c61ba99f6a441b316c21 to your computer and use it in GitHub Desktop.

Revisions

  1. jurosh revised this gist Nov 20, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ const reactRouterResult =
    : null
    : null;

    // Prettier 3.1 (Back to old days)
    // Prettier 3.1 (Back to the old days)
    const reactRouterResult =
    children && !isEmptyChildren(children)
    ? children
    @@ -22,7 +22,7 @@ const reactRouterResult =
    : null
    : null;

    // Prettier 3+ (Experimental)
    // Prettier 3+ (Experimental https://github.com/prettier/prettier/pull/13183)
    const reactRouterResult =
    children && !isEmptyChildren(children) ? children
    : props.match ?
  2. jurosh renamed this gist Nov 20, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. jurosh created this gist Nov 20, 2023.
    33 changes: 33 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    // Prettier < 3
    const reactRouterResult =
    children && !isEmptyChildren(children)
    ? children
    : props.match
    ? component
    ? React.createElement(component, props)
    : render
    ? render(props)
    : null
    : null;

    // Prettier 3.1 (Back to old days)
    const reactRouterResult =
    children && !isEmptyChildren(children)
    ? children
    : props.match
    ? component
    ? React.createElement(component, props)
    : render
    ? render(props)
    : null
    : null;

    // Prettier 3+ (Experimental)
    const reactRouterResult =
    children && !isEmptyChildren(children) ? children
    : props.match ?
    component ? React.createElement(component, props)
    : render ? render(props)
    : null
    : null