Skip to content

Add alias and null value#2017

Merged
vjeux merged 1 commit intoprettier:masterfrom
stubailo:kitchen-sink
Jun 7, 2017
Merged

Add alias and null value#2017
vjeux merged 1 commit intoprettier:masterfrom
stubailo:kitchen-sink

Conversation

@stubailo
Copy link
Copy Markdown
Contributor

@stubailo stubailo commented Jun 7, 2017

Also, this means we pass the kitchen sink test case! 🎉

I think that means the only thing we need to add is comments and we are good to go for an initial release!

Add kitchen sink test case
@vjeux vjeux merged commit 0583fd4 into prettier:master Jun 7, 2017
@vjeux
Copy link
Copy Markdown
Contributor

vjeux commented Jun 7, 2017

The next step is to get your hand on as much graphql as possible and run --debug-check on it to make sure that it outputs correct code. And look at the output to make sure that it looks good.

The bar for announcing a language support is really high. I want to make sure that the first impression is awesome and "it just works".

There are a ton of "pretty printers" out there. The reason why prettier is successful is that we spent a huge amount of time getting all the edge cases right.

The good news is that GraphQL is simpler so that shouldn't take as long, but just having printed things is not enough. That's just the first step :)

@vjeux
Copy link
Copy Markdown
Contributor

vjeux commented Jun 7, 2017

Also don't you need union types?

#2014

@stubailo
Copy link
Copy Markdown
Contributor Author

stubailo commented Jun 7, 2017

@vjeux that PR is for the schema language, I'm mostly concerned with the query language at the moment.

Is there something in particular I can look at to figure out how to get comments working?

@stubailo
Copy link
Copy Markdown
Contributor Author

stubailo commented Jun 7, 2017

@leebyron if you have a moment, can you check my style preferences in the kitchen sink example? Curious if you have some opinions there.

@leebyron
Copy link
Copy Markdown

leebyron commented Jun 7, 2017

There seem to be inconsistency between spacing in List and Object literals.

It would be helpful to see tests that cover edge cases like when alias is used on a >80c line

@stubailo stubailo deleted the kitchen-sink branch June 7, 2017 22:47
@stubailo
Copy link
Copy Markdown
Contributor Author

stubailo commented Jun 7, 2017

@leebyron this is intentionally adding spaces inside Object literals, but not inside List literals, to match the behavior of prettier for JavaScript.

@vjeux
Copy link
Copy Markdown
Contributor

vjeux commented Jun 7, 2017

@stubailo There's a setting to tweak that: bracketSpacing. Does it respect the setting?

blowery added a commit to Automattic/wp-prettier that referenced this pull request Jun 21, 2017
* tag '1.4.4': (421 commits)
  1.4.4
  1.4.3
  Clean up build script, add Babel for docs js bundles (prettier#1970)
  Check if the next group has comments (prettier#2040)
  Include typeAnnotation inside of node location (prettier#2039)
  Fix decorator comments for export class (prettier#2038)
  Add group around TSMethodSignature (prettier#2037)
  Do not throw for unprinted comments inside of JSX (prettier#2036)
  Break decorator before content (prettier#2032)
  Fix less &:extends when parsed with scss (prettier#2034)
  Fix parenthesis for call expression inside of member expression inside of new (prettier#2035)
  Break if string | null (prettier#2028)
  Only prevent lone `set` if there's no type annotations (prettier#2026)
  Add semi for functions without body (prettier#2025)
  Update commands.md
  Update commands.md
  Pretty printer commands.js
  GraphQL: Add support for union types (prettier#2014)
  Update README for emacs integration link (prettier#2024)
  Add alias and null value (prettier#2017)
  ...
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 20, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants