Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Upgrade prettier and run over all files #4214

Merged
merged 3 commits into from
Nov 5, 2018

Conversation

aboyton
Copy link
Contributor

@aboyton aboyton commented Oct 9, 2018

#4012 added prettier support but then didn't run it over everything and turned it on for YAML files despite using a version that doesn't support YAML.

This:

  • Upgrades Prettier to 1.14 whic adds yml support.
  • Turns on trailing commas = all as that seems to be what most of the code is doing.
  • Runs prettier over everything

This also has the bonus of making future PRs much smaller.

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

As above, this upgrades Prettier, sets an option and runs it over everything.

Is there anything you'd like reviewers to focus on?

Not much as this is autogenerated but we should check that it hasn't broken anything.

CHANGELOG.md entry:

  • Upgrade Prettier, turn on trailingComma: "all" and run it over all files.

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @aboyton! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

This:
* Upgrades Prettier to  1.14 whic adds yml support.
* Turns on `trailing commas = all` as that seems to be what most of the code is doing.
* Runs prettier over everything

This also has the bonus of making future PRs much smaller.
@johnwiseheart
Copy link
Contributor

I think its probably a good idea to merge this. @giladgray thoughts?

@JoshuaKGoldberg
Copy link
Contributor

@johnwiseheart this is creating a lot of noise for other PRs. I'll go ahead and merge this in.

@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Nov 5, 2018
@aboyton
Copy link
Contributor Author

aboyton commented Nov 5, 2018

I'm very happy to rebase this if that would help.

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Nov 5, 2018

@aboyton it's ready to be merged except it fails on typescript@next for `object-literal-key-quotes ☹... I can repro locally and am trying to figure it out now. If you can fix it, that'd be great too!

Edit: might be this...

const t = {
  hello: 123,
  bye-bye: 45,
  // ^ invalid syntax
  nested: {
    "bird": 2,
    ~~~~~~     [Unnecessarily quoted property 'bird' found.]
    egg: 3,
  }
};

Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 7aff4e5 into palantir:master Nov 5, 2018
@aboyton aboyton deleted the prettier branch November 5, 2018 23:13
JoshuaKGoldberg pushed a commit that referenced this pull request Nov 5, 2018
* Re-ran Prettier on source files again, with some more ignores

Continues on #4214 - I either merged incorrectly or missed some file exclusions that were needed.

* Fixed up introduced linting errors
@JoshuaKGoldberg JoshuaKGoldberg mentioned this pull request Nov 6, 2018
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants