Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/prettier
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.20.0
Choose a base ref
...
head repository: prettier/prettier
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.21.0
Choose a head ref
  • 19 commits
  • 38 files changed
  • 3 contributors

Commits on Feb 28, 2017

  1. Configuration menu
    Copy the full SHA
    aef1ac6 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2017

  1. re-run snapshot tests

    vjeux committed Mar 1, 2017
    Configuration menu
    Copy the full SHA
    f1548e7 View commit details
    Browse the repository at this point in the history
  2. Run prettier 0.20.0 (#835)

    vjeux authored Mar 1, 2017
    Configuration menu
    Copy the full SHA
    198a9e4 View commit details
    Browse the repository at this point in the history
  3. [JSX] Don't wrap JSX Elements in parentheses if they are inside JSX E…

    …xpression Containers (#845)
    rattrayalex authored and vjeux committed Mar 1, 2017
    Configuration menu
    Copy the full SHA
    475208d View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2017

  1. Fix comment after the last argument of a function (#856)

    The issue is that the comment algorithm attaches it to the return type / value but we want to attach it to the previous one.
    
    Fixes #612
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    d90af42 View commit details
    Browse the repository at this point in the history
  2. Fix travis build image

    vjeux authored Mar 3, 2017
    Configuration menu
    Copy the full SHA
    a91bb5f View commit details
    Browse the repository at this point in the history
  3. Do not break require calls (#841)

    This has come up a couple times on the issue tracker on the react-native-web discussion about Twitter internals. It seems like there's a concensus that people don't break long require calls and they'd rather have it go > 80 columns.
    
    Fixes #303
    Fixes #752
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    705ac7d View commit details
    Browse the repository at this point in the history
  4. Stabilize import as comments (#855)

    Since this is extremely rare, I just took the easy way out and if you are adding a comment inside the "as" node, I just move it outside. We could be more fancy but that works.
    
    Fixes #620
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    516f590 View commit details
    Browse the repository at this point in the history
  5. Fix jsx expression comment that break (#852)

    In #596, I fixed a bunch of jsx expression comment edge cases and happened to add a softline there. But it turns out that it's not needed and is actually harmful :)
    
    Fixes #712
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    4b237d3 View commit details
    Browse the repository at this point in the history
  6. Inline last arg function arguments (#847)

    ```js
    SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((err, result) => {
      // comment
    });
    ```
    
    currently breaks into
    
    ```js
    SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall((
      err,
      result,
    ) => {
      // comment
    });
    ```
    
    which looks bad, instead this PR makes it break
    
    ```js
    SuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperSuperLongCall(
      (err, result) => {
        // comment
      }
    );
    ```
    
    which look better
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    211e18b View commit details
    Browse the repository at this point in the history
  7. Keep parenthesis on export default function (#844)

    It turns out that my fix was not correct. We should not add parenthesis for FunctionDeclaration instead of checking if the function expression is named.
    
    Fixes #819
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    3649835 View commit details
    Browse the repository at this point in the history
  8. Inline short expressions for boolean operators too (#826)

    In #605 I restricted it to binary operations as I didn't know how it would affect boolean operations but it turns out the same technique solves problems that people are reporting. So doesn't make sense to restrict it.
    
    Fixes #824
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    5523c4f View commit details
    Browse the repository at this point in the history
  9. Introduce -l option (#854)

    gofmt has this option and it's very handy for commit-hooks.
    
    Fixes #851
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    205458a View commit details
    Browse the repository at this point in the history
  10. Add parenthesis around assignments (#862)

    This is a neat trick from the React codebase. It helps highlight the fact that this is an assignment and not a comparison which is subtle to realize.
    
    Fixes #861
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    fa9dca3 View commit details
    Browse the repository at this point in the history
  11. Do not put \n after label (#860)

    This is a leftover from the recast prototype, it hasn't been touched since then. I have never seen anyone not put the label on the same line.
    
    Fixes #859
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    735f07f View commit details
    Browse the repository at this point in the history
  12. Fix comment for call( // comment (#858)

    This is a pretty exotic way to put a comment and it's been a long time since I have seen prettier output be as broken :)
    
    Fixes #857
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    fe38dab View commit details
    Browse the repository at this point in the history
  13. Do not break long it calls (#842)

    This happens very frequently that naming a test makes the entire line go > 80 columns and requires to indent everything which takes a lot more space. We've had this being reported multiple times and it also affects a lot of tests inside of fb.
    
    Fixes #159
    
    (Note, this is built on-top of #841 but github doesn't handle stacked pull requests well...)
    vjeux authored and jlongster committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    184382d View commit details
    Browse the repository at this point in the history
  14. Fix flow union comments (#853)

    The comments infra has been architected with trailing operators and fails for leading `|`. Instead of having leading comments, we can put trailing comments on the previous one and use the same technique as assignment to deal with the indentation.
    
    Fixes #849
    vjeux authored Mar 3, 2017
    Configuration menu
    Copy the full SHA
    7d24b0a View commit details
    Browse the repository at this point in the history
  15. 0.21.0

    vjeux committed Mar 3, 2017
    Configuration menu
    Copy the full SHA
    b570154 View commit details
    Browse the repository at this point in the history
Loading