Skip to content

Add option philosophy to docs - #3855

Merged
lydell merged 3 commits into
prettier:masterfrom
lydell:option-philosophy
Feb 2, 2018
Merged

lydell merged 3 commits into
prettier:masterfrom
lydell:option-philosophy

Conversation

@lydell

@lydell lydell commented Jan 31, 2018 •

Copy link
Copy Markdown
Member

Note to anyone finding this PR: This is not an attempt to impose my philosophy on Prettier. I've tried hard to write down what I've gathered from the project during its ~1 year of existence.

Comment thread docs/option-philosophy.md Outdated
* `--jsx-bracket-same-line` was needed for a big company with a huge code base (Facebook), which backed the project when it got started, to be able to [adopt Prettier at all](https://github.com/prettier/prettier/pull/661#issuecomment-295770645).

Finally, perhaps the most interesting of them all is `--bracket-spacing`.
The truth is that not even [Prettier's creator remembers exactly why it exists](https://github.com/prettier/prettier/issues/715#issuecomment-281096495). It was added super early on without much thought. It now serves as an example of the types of options we should avoid.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The linked comment doesn't actually say that he doesn't remember why it exists, so this is a bit misleading...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That was my interpretation. Do you have a better suggestion?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After re-reading it, I can see your interpretation now. I think it's fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that I changed “remembers” to “knows” – is that better?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, I think that's closer.

@vjeux vjeux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this well written explanation :)

@j-f1 j-f1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀

@jlongster

Copy link
Copy Markdown
Member

Thanks a lot for this! We meant to write something like this a long time ago.

@lydell
lydell merged commit e591b00 into prettier:master Feb 2, 2018
@lydell
lydell deleted the option-philosophy branch February 2, 2018 07:08
@j-f1

j-f1 commented Feb 2, 2018 •

Copy link
Copy Markdown
Member

@lydell Done ✅

@suchipi

suchipi commented Feb 2, 2018

Copy link
Copy Markdown
Member

Woah, I didn't know that common replies page existed. Nice

lipis added a commit that referenced this pull request Feb 4, 2018
* 'master' of github.com:prettier/prettier:
  tests(css): custom media (#3879)
  Add 3YOURMIND to users.yml (#3881)
  fix(css): stringify unquoted data urls (#3877)
  fix(css): at rules improve formatting and tests (#3828)
  Add option philosophy to docs (#3855)
  docs: add information about precise-commits (#3818)
  Remove redundant quotes from image links in .yml files (#3860)
lipis added a commit that referenced this pull request Feb 5, 2018
* 'master' of github.com:prettier/prettier:
  Remove commented out code (#3886)
  feat: Add support for no-response-bot (#3873)
  refactor(printer-postcss): use `node` name and implement helper functions (#3893)
  tests(css): custom media (#3879)
  Add 3YOURMIND to users.yml (#3881)
  fix(css): stringify unquoted data urls (#3877)
  fix(css): at rules improve formatting and tests (#3828)
  Add option philosophy to docs (#3855)
  docs: add information about precise-commits (#3818)
@kachkaev

kachkaev commented Mar 20, 2018 •

Copy link
Copy Markdown
Member

Funny enough, elm-format that you are referring here is now a part of one Prettier community plugin: #4161 🙌

@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 18, 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.

8 participants