Commit Graph
55 Commits
Author SHA1 Message Date
fisker CheungandChris Brody 73e3976c34 Add espree parser (#9000)
Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>
2020-10-13 09:14:02 +08:00
fisker Cheung 589ebf670b Add pure css parser (#7933) 2020-08-28 13:07:49 +08:00
Ted Mokeandfisker Cheung 7348a9de14 Docs: Fix links (#8850)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-07-28 20:19:10 +08:00
554b15473d Document recommended setup and improve docs overall (#8510)
Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-28 09:47:29 +08:00
fisker Cheung f2c1d70918 JS: pragma support files with shebang (#8376) 2020-05-23 19:28:05 +08:00
Georgii Dolzhykov a081bf812c Close simple docs related issues (#8289)
* close #7805

* close #5571

* close #5121

* partially address #8094
2020-05-12 16:00:28 +03:00
Kevin Gibbons 22d149b9f6 Add --embedded-language-formatting={auto,off} option (#7875) 2020-04-11 20:22:44 +03:00
Georgii Dolzhykov f859cafb84 partial revert of #7937 2020-04-06 15:51:21 +03:00
fisker Cheung 096c28f080 Fix docs code style (#7937) 2020-04-03 18:44:03 +08:00
Brad Adams 70da4fa630 docs: fix broken links (#7919) 2020-04-01 03:25:17 +03:00
Georgii Dolzhykov b4a5225770 docs: autocrlf option of Travis CI 2020-03-24 04:24:10 +02:00
JounQinandGeorgii Dolzhykov c1937cb1b8 feat: add new parser babel-ts to parse TypeScript syntaxes via Babel (#6400)
* feat: add new parser `babel-ts` to parse TypeScript syntaxes via Babel

* docs: document parser babel-ts

* chore: enable babel-ts in markdown and worker.js

* verify all TS tests against babel-ts except disabled by disableBabelTS

* support for TSDeclareMethod; fix abstract properties and methods

* fix embedded angular templates and styles

* fix TSImportType

* simplify babel options combinations

* fix method decorators

* fix ranges

* work around loc inconsistencies for SequenceExpression

* don't print trailing comma in type parameters (unsupported in TS < 3.3)

* preserve quotes for class properties

* align printing of single-parameter functions

* fix comments in degenerate single-element unions and intersections

* fix comments for methods

* fix comments for mapped types

* edit docs, change 'since' to 2.0.0

* add changelog

* fix code sample on playground

* update snapshots after rebase

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-29 14:11:16 +02:00
Alexander Kachkaev e00ce8c2c8 Change arrowParens to always by default for 2.0 (#7430) 2020-01-29 13:31:25 +02:00
Alexander Kachkaev 1b3a5d3572 Change endOfLine to lf by default for 2.0 (#7435)
* Towards changing default value for endOfLine

* Update tests and snapshots

* Add placeholder for changelog_unreleased

* Add CHANGELOG

* Undo adding snapshot tests for auto as it does not play well on Windows in CI

* Tweak changelog

* Update jest snapshot
2020-01-28 23:35:47 +02:00
Alexander Kachkaev 210db4700c Document changes in 6963 (#7441)
* Document 6963

* Minor tweaks

* Minor edit

* Add a note on the changed default value in options.md to keep things in sync
2020-01-28 19:09:06 +02:00
fisker Cheung 791996df7b Set trailingComma default value to es5 (#6963)
* Set `trailingComma` default value to `es5`

* Update `options` documentation

* Update tests

* style

* fix js code style

* change options order

* update tests_integration snap

* disable es5 for __ng_interpolation

* fix angular tests

* fix scss test

* fix `css_trailing_comma` snap

* fix css_scss snapshot
2019-11-18 11:39:12 +01:00
kamilic 7d0175ca90 feat: implement --vue-indent-script-and-style mentioned at pr-#… (#6157)
* feat: implement --vue-indent-script-and-style mentioned at pr-#6077

* docs: --vue-indent-script-and-style

* update new test case

* feat: playground for --vue-indent-script-and-style

* chores: Revert package.json version

* Remove noisy snapshots
2019-08-01 11:06:12 +02:00
Lucas Azzola f526c47b1e Add an option to modify when Prettier quotes object properties (#5934)
* Implement quote-props=preserve

* Implement quote-props=consistent

* Add tests

* Enable quoteProps in playground

* Add documentation

* Cache objectHasStringProp calculations

* Fixup changelog
2019-03-06 20:33:08 +11:00
Alon Bukai bf389fb48e fix: grammar if it get -> if it goes (#5835)
Another possible option is `if it gets`

<!-- Please provide a brief summary of your changes: -->

<!-- Please ensure you’ve done all of these things (if applicable). -->
<!-- You can replace the `[ ]` with `[x]` to mark each task as done. -->

- [ ] I’ve added tests to confirm my change works.
- [ ] (If changing the API or CLI) I’ve documented the changes I’ve made (in the `docs/` directory)
- [ ] (If not an internal change) I’ve added my changes to the `CHANGELOG.unreleased.md` file following the template.
- [x] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/master/CONTRIBUTING.md).

**✨[Try the playground for this PR](https://prettier.io/playground-redirect)✨**
2019-02-06 21:31:47 +11:00
Nathan Totten a093bb3f7b Adds LWC Parser to support unquoted interop attributes (#5800)
This pull requests adds a new parser option `lwc`. This is the same as the HTML parser, but it adds support for unquoted HTML attributes per the needs of LWC. See: #5627
2019-02-01 13:58:50 +08:00
James Henry 1143619600 chore: update typescript-estree to new package name (#5799) 2019-01-28 19:46:51 -05:00
Jimmy Gaussen a8d423b18c docs: remove redundant "./" from relative links (#5741)
Fixes #5740

fixed with `sed -i "s#(\./#(#" docs/*.md website/versioned_docs/version-stable/*.md`
2019-01-10 12:06:41 -02:00
Ika 7c4cebeaa5 feat: add babel-flow (#5685) 2018-12-29 21:35:47 +08:00
Wei-Wei Wu 91c20f7fbe Rename "babylon" with "babel" (#5647) 2018-12-27 21:05:19 +08:00
Alexander Kachkaev a18d80253a Restore --check option docs (#5674) 2018-12-25 16:01:02 +08:00
Alexander Kachkaev 439b1649ff Temporary remove --check docs until 1.16 is released to avoid confusion (#5671)
Context: https://github.com/prettier/prettier/pull/5629#issuecomment-448933238
2018-12-21 06:27:17 -05:00
Alexander Kachkaev 711c6d78a8 Add --check option (#5629) 2018-12-19 22:03:30 +08:00
Jed Fox b878a54e6a Reformat the first version info in the option docs (#5604)
* Reformat the first version info in the option docs

* Make the italic text actually italic

* Update new options; reword the filepath docs
2018-12-07 13:16:31 -05:00
Ika fa40f2ddd3 docs(blog): 1.15 release (#5296) 2018-11-07 09:09:04 +08:00
Alexander Kachkaev b87fe4cf22 Add option to enforce certain line endings (#5327) 2018-11-06 22:47:13 +08:00
Simon Lydell e2d8834c49 Fix link to jsx-single-quotes option 2018-11-05 09:37:30 +01:00
Stefan Mirea e17512adcd Add an option to print single quotes in JSX (#4798)
* feat(option-singleQuote-jsx): Added jsSingleQuote

* feat(option-singleQuote-jsx): Refactored to use a simple jsxSingleQuote flag

* feat(option-singleQuote-jsx): Fixed borked rebase

* feat(option-singleQuote-jsx): Updated snapshots

* feat(option-singleQuote-jsx): Resolved pending comments

* feat(option-singleQuote-jsx): Removed assert

* Fixed merge conflicts

* Updated snapshots after merge conflicts
2018-11-04 16:36:00 -05:00
JSON Deppen 80c22d8e39 Fix broken "strings rationale" link (#5163) 2018-09-29 18:01:49 +02:00
Simon Lydell a459743eb2 Update rationale (#5136)
* Clarify semicolon example

* Add rationale for print width

Fixes #5081.

* Link options and rationale

* Add rationale for comments

Refs. #5121.

* Mention that spaces can be used for alignment for --use-tabs

Refs. #4199.

* Add missing word

* Remove bad `istanbul ignore next` example
2018-09-29 09:41:21 +02:00
Simon Lydell dc590e5e4b Improve documentation for the parser option (#5129)
- Warn about setting parser at the top level. Refs. #4638.
- Remove top level parser from examples. Instead show the most common
options (I also removed printWidth, since we don't recommend changing
it). Refs. #4638.
- Show how to configure the flow parser for .js files. Refs. #4638.
- Update valid options for the parser option, including links and "since
version".
- Clarify babylon vs flow.
2018-09-29 09:40:19 +02:00
James Henry 81cf08118e Drop-in replacement: typescript-estree for typescript-eslint-parser (#5139) 2018-09-25 15:44:21 -04:00
Lucas Duailibe 412b064df8 Format docs with Prettier 1.13 2018-05-27 15:38:31 -03:00
Lucas Duailibe 4daeaa0d9a Update docs for default parser (#4557) 2018-05-27 15:17:17 -03:00
Hozefa b504e79113 update doc with example for JSX Brackets config (#4455)
* update doc with example for JSX Brackets config

* Put ignore comment before code blocks

* Make Prettier happy
2018-05-10 15:07:52 +02:00
Nick Arnold d6db35c16b docs: update babylon project url (#3484) 2017-12-14 14:23:53 +11:00
Ika 073c0b16d8 feat(markdown): add proseWrap: "preserve" option (#3340)
* test: add test case

* feat(markdown): add `proseWrap: "preserve"` option

* test: add tests

* docs(options): update `proseWrap`

* feat(markdown): change default to `proseWrap: "preserve"`

BREAKING CHANGE

* docs(options): update `proseWrap`

* test: specify option explicitly

* Fix lint after merge

* Fix error after merge
2017-12-02 09:48:40 +11:00
Ryan Zimmerman d6bb6edeae Add note about proseWrap option under printWidth for clarity (#3364) 2017-11-30 17:54:54 -03:00
Ika ac3f74e7a3 docs(options): add available version for arrow-parens (#3339) 2017-11-29 00:20:26 +08:00
Suchipi Izumi 6abdd2c6b7 PR feedback 2017-11-27 22:27:34 -07:00
Stephen Scott 9a1e408a3f Add option and specs (no implementation yet)
These new snapshots are from https://github.com/prettier/prettier/pull/2676
2017-11-27 22:26:58 -07:00
Ika 76efb33e75 chore: setup markdown formatting (#3224)
* chore(deps): upgrade prettier to v1.8.2

* chore: setup lint-docs script

* docs: add `<!-- prettier-ignore -->`s

* docs: format docs

* Revert "docs: format docs"

This reverts commit 6dba903987dddc498cb589ca311905f25b6aee53.

* chore(prettierrc): set `--no-prose-wrap`

* docs: format docs

* Revert "docs: format docs"

This reverts commit 139bd744b6921916be8fac4fa3bab83bae5d12df.

* docs: tweak

* docs: format docs

* chore: rename .prettierrc

* chore: rename back to .prettierrc

* chore: split out third-party

* refactor: fix linting

* chore: do not split out third-party on website
2017-11-22 22:27:40 +11:00
Ika c37e7fae2a docs(options): add note for available version (#3217) 2017-11-09 13:39:07 +08:00
Lucas Azzola 98eb2c98b7 Add proseWrap docs (#3201) 2017-11-08 22:57:08 +11:00
Lucas Azzola 71a5533c4e Move all docs to website (#3139)
* Sync README -> docs/options.md

* Sync README -> docs/*.md

* Misc fixups

* Remove markdown-toc

* Remove insert-pragma from ToC

* Never again!

* Move all docs to ./docs

* Remove yarn toc

* Fix inter-doc links

* Fix links in footer

* Clean up README.md

* Add basic description to README.md

* Use flat badges

* Move editor guides to website

* Improve prettier-ignore docs

* Fixup bad find/replace

* Add JSON to README

* Fix custom parser API link

* Fixup GitHub centering, add downloads badge

* Add 1.8 docs

* docs(website): mention markdown on homepage (#1)

* Add intro

* Add watching-files.md

* Fix markdown syntax highlighting

* Switch back to .md links
2017-11-07 14:39:07 +11:00
Benny Neugebauer fa62a438a5 docs: fix table for insertPragma (#3010)
* docs: fix table for `insertPragma`

* Update options.md

* Update options.md
2017-10-11 22:30:03 +11:00