Commit Graph
100 Commits
Author SHA1 Message Date
Georgii Dolzhykov 4a8fe3bc3c Fix --debug-print-doc (#10445) 2021-02-28 20:52:57 +02:00
Georgii Dolzhykov ff7a194e8a Recreate yarn.lock 2021-02-28 18:49:56 +02:00
Georgii Dolzhykov 285c15ef08 docs: how to ignore files using negative patterns (#10400) 2021-02-24 21:47:07 +02:00
Georgii Dolzhykov 3dfdb2cff5 Add Support Requests bot config file (#10387) 2021-02-23 20:17:15 +02:00
Georgii Dolzhykov ec27ade49b Heuristic for grouping parameters in method signatures (#10357)
* Heuristic for grouping parameters in method signatures
* Apply the same logic to function declaration and Flow types
* Group only if there is only one parameter
* Don't group if type param has constraints/default or >1 type param
2021-02-23 16:38:56 +02:00
Georgii Dolzhykov ca7c6fdec5 Add issue template config (#10386) 2021-02-22 16:45:02 +02:00
Georgii Dolzhykov 42f8271a1e Indent type assertions in heads of call and member expressions (#10341) 2021-02-20 14:37:08 +02:00
Georgii Dolzhykov 31b3351800 Better formatting for nested await in member/call expression heads (#10342) 2021-02-20 12:50:44 +02:00
Georgii Dolzhykov aef9277ada Print trailing comma for TS type parameters but not type arguments (#10353) 2021-02-20 12:47:56 +02:00
Georgii Dolzhykov e147c3b1c4 Fix ASI protection for private fields (#10334) 2021-02-18 12:39:56 +02:00
Georgii Dolzhykov 3950ce194d Correct parentheses for non-null assertions (#10337) 2021-02-18 01:52:24 +02:00
Georgii Dolzhykov 0a647a0d31 Format assignments more consistently (#10222) 2021-02-16 21:25:11 +02:00
Georgii Dolzhykov 9a2dc517ad Fix yarn.lock 2021-02-16 13:23:14 +02:00
Georgii Dolzhykovandfisker Cheung 2d1186995d Refine CONTRIBUTING.md (#10324)
* Slightly refine CONTRIBUTING.md

* Write more about run_spec

* Wording

* Deeper tests is an advanced topic. Move to bottom

* Mention prettier-regression-testing

* Fix the type for snippets

* Typo

* Add 'Advanced topics' heading

* Fix run_spec types

* Minor edits

* Add link

* Wording around yarn fix

* Update CONTRIBUTING.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-02-16 08:56:32 +02:00
Georgii Dolzhykov 3a73f48a0e Don't use smart quotes for JSON5 with --quote-props=preserve (#10323) 2021-02-15 19:13:33 +02:00
Georgii Dolzhykov 81e6208e63 Allow arg hugging for non-concise arrow functions with return type (#10316) 2021-02-15 19:13:09 +02:00
Georgii Dolzhykov a322cf152a Disable Babel error recovery for invalid escaped characters in identifiers (#10322) 2021-02-15 16:58:50 +02:00
Georgii Dolzhykov 7e8f746a4e website: remove svgo (#10315) 2021-02-15 05:29:24 +02:00
Georgii Dolzhykov ca4a51dcd9 build: fix tree shaking for front matter related functions (#10314) 2021-02-15 05:29:15 +02:00
Georgii Dolzhykov 8ba12c9d0d website: remove js for removed elements 2021-02-15 02:09:07 +02:00
Georgii Dolzhykov d3757fb6b4 website: add State of JS 2020 (#10312) 2021-02-15 00:22:08 +02:00
Georgii Dolzhykov 662cdb04db RFC: label doc (#10275)
* RFC: label doc

* Update functions in doc-utils
2021-02-10 17:08:54 +02:00
Georgii Dolzhykov f3906d84d4 Refactor: rename FastPath → AstPath (#10276) 2021-02-10 13:42:06 +02:00
Georgii Dolzhykov a55fe2d961 Add tests for #2239 (#10286) 2021-02-10 01:06:14 +02:00
Georgii Dolzhykov 03a43ae55f Fix error thrown on expressions like a(b => c => function (){}) (#10278) 2021-02-09 11:08:14 +02:00
Georgii Dolzhykov 0b5f259c08 Another minor fix in doc-debug 2021-02-06 14:41:02 +02:00
Georgii Dolzhykov 5a33fec904 RFC: indentIfBreak (#10221) 2021-02-05 01:03:40 +02:00
Georgii Dolzhykov 575be32c05 Minor fixes in doc-debug 2021-02-04 13:42:47 +02:00
Georgii Dolzhykovandfisker Cheung 58173be8b8 docs: revise commands.md (#10181)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-02-02 22:43:43 +02:00
Georgii Dolzhykov 62561039ac Playground: show sidebar by default (#10204)
Show sidebar by default. Hide if window width < height (likely mobile)
2021-02-02 02:23:16 +02:00
Georgii Dolzhykov 56840d4890 Followup for #10169: minor tweaks (#10177)
* Followup for #10169: minor tweaks

* Add Copy doc button to Playground
2021-01-30 18:25:43 +02:00
Georgii Dolzhykov 78b38d2282 Round-trippable --debug-print-doc (#10169) 2021-01-29 21:48:34 +02:00
Georgii Dolzhykov a7ea77e0ef Fix regression after pr-10106 (#10160) 2021-01-29 19:58:24 +02:00
Georgii Dolzhykov 8846448b85 Handlebars: fix formatting of attributes (#10145)
* Handlebars: fix formatting of attributes

* Add group only for class

* Add changelog

* Update clean.js

* Simplify ConcatStatement

* Lowercase attr name in clean

* Use text instead of n.chars
2021-01-28 23:45:08 +02:00
Georgii Dolzhykov b7a0e253f6 Fix changelog for #8233 2021-01-28 00:34:39 +02:00
Georgii Dolzhykov 53b59d2d39 Fix lineSuffixBoundary (#10122) 2021-01-28 00:29:34 +02:00
Georgii Dolzhykov 79d2f4a295 Add CLI flag for debugging comment attachment issues (#10124) 2021-01-27 12:30:10 +02:00
Georgii Dolzhykov 63a771db55 Add parallel-prettier to "Related Projects" (#10147) 2021-01-27 10:06:03 +02:00
Georgii Dolzhykov 1df287acc8 Use default parameters where possible and other microrefactoring (#10135) 2021-01-27 12:36:39 +08:00
Georgii Dolzhykov 343d372845 Document that Prettier never unquotes numeric properties in TS and Flow (#10126)
* Document that Prettier never unquotes numeric properties in TS and Flow

* Add Angular

* Mention Vue
2021-01-26 20:17:30 +02:00
Georgii Dolzhykov c5484f7a0a website: bigger font for <h5> in blog (#10142) 2021-01-26 18:56:42 +02:00
Georgii Dolzhykov 2b3716d527 Add skipped changelog entry to 2.2.0 blog post 2021-01-25 14:15:47 +02:00
Georgii Dolzhykov 24433cbbf6 Use fill to print number-only arrays (#10106) 2021-01-25 10:07:06 +02:00
Georgii Dolzhykov f333c65231 Minor spellchecking and typechecking fixes (#10125) 2021-01-25 02:43:42 +02:00
Georgii Dolzhykov 2bb6cc4bf8 Fix webpack 5 CLI args in yarn start in website 2021-01-21 00:33:08 +02:00
Georgii Dolzhykov af9478009e copy rationale.md update to stable docs 2021-01-19 18:03:46 +02:00
Georgii Dolzhykov 4273cbf95f docs: add a note on formatting reversibility (#10062) 2021-01-19 11:39:01 +02:00
Georgii Dolzhykov 0354b2ef9d Add a test for HTML (#10077) 2021-01-18 16:40:57 +02:00
7cf524fa03 Smarter formatting of HTML class attribute (#7865)
* html: break class attr onto multiple lines, but try keeping consecutive classes with the same prefix on one line

* add changelog

* add more tests

* improve doc structure to fix an issue with the closing quote

* Update changelog_unreleased/html/pr-7865.md

Co-Authored-By: Jed Fox <git@twopointzero.us>

* handle classes with leading _ and -

* update snapshots

* Lint

* Update pr-7865.md

* Update changelog entry

Co-authored-by: Jed Fox <git@twopointzero.us>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-01-18 15:50:52 +02:00
Georgii Dolzhykov 92cf9452e9 Disable Babel's error recovery for omitted call arguments (#10065) 2021-01-18 09:45:37 +02:00
Georgii Dolzhykov 1344d9a18a Fix an oversight from #9709 2020-12-02 18:58:08 +02:00
Georgii Dolzhykov c0e1179391 copy option philosophy to stable docs 2020-11-26 19:29:25 +02:00
Georgii DolzhykovandLucas Azzola 3a6d659ecc Update option philosophy: option requests aren’t accepted anymore (#8540)
* Update option philosophy: option requests aren’t accepted anymore

* Update docs/option-philosophy.md

Co-authored-by: Lucas Azzola <lucas.azzola@iress.com>

* Update option-philosophy.md

Co-authored-by: Lucas Azzola <lucas.azzola@iress.com>
2020-11-26 19:19:40 +02:00
Georgii Dolzhykov e721ef30ea Flatten function expression parameters in hugged last argument (#9662)
Fixes #3376
This was done for arrow functions in #1305 ("Avoid breaking arguments for last arg expansion").
This PR enables the same for function expressions unless the function expression is the only argument.
2020-11-14 13:17:01 +02:00
Georgii Dolzhykov d6858d52ad Changelog edits for 2.2 (#9603) 2020-11-05 13:07:29 +09:00
Georgii Dolzhykov 633f084a76 LESS: fix comments in value lists (#9356) 2020-10-12 09:16:36 +08:00
Georgii Dolzhykov fa04a5b464 Cleanup changelog_unreleased (#9325)
These were released in 2.1.2
2020-10-06 10:12:46 +09:00
Georgii Dolzhykov 488e08d70b Remove the need to add full GitHub links in changelog entry titles (#9104) 2020-09-01 08:51:32 +08:00
Georgii Dolzhykov c94d1bc014 update stable docs (plugins.md) 2020-08-30 22:08:56 +03:00
Georgii Dolzhykov b42abbc99f website: remove dependencies shared with root package.json (#8618) 2020-06-22 14:05:28 +03:00
Georgii Dolzhykov e2e72154d6 Add a disclaimer about non-standard syntax (#8613) 2020-06-22 13:25:33 +03:00
Georgii Dolzhykov 3094ad5aa2 Fix unstable comments in binary expressions (#8491) 2020-06-05 09:55:22 +03:00
Georgii Dolzhykov 1df6838b0e Revert #7787 (#8495) 2020-06-04 14:38:51 +03:00
Georgii Dolzhykov 5a0e33cc84 fix(range): improve detection of JS source elements (#8419)
* fix(range): improve detection of JS source elements

* Add changelog entry

* Remove unneeded comment

* Add more types and update snapshots
2020-05-29 07:29:09 +03:00
Georgii Dolzhykov cf5d899d44 fix(typescript): remove now-unneeded workaround for directives (#8422)
* fix(typescript): remove unneeded workaround for directives

* Add changelog entry
2020-05-27 17:55:59 +03:00
Georgii Dolzhykov 81d7e06973 Fix range indentation (#8410) 2020-05-27 11:48:32 +03:00
Georgii Dolzhykov 7f2ba08fb0 refactor(range): minor cleanup (#8421) 2020-05-27 11:48:02 +03:00
Georgii Dolzhykov 67cbab7f48 Add plugins' parsers to the parser option (#8390)
* Add plugins' parsers to the `parser` option

* Add changelog entry

* Add plugin name to value description

* Update snapshot
2020-05-25 14:03:20 +03:00
Georgii Dolzhykov 47ed9a77e3 Add the browser and unpkg field to package.json (#8387) 2020-05-25 14:51:54 +08:00
Georgii Dolzhykov d420202df4 fix(js): comments after superclass (#8312)
* Fix comments after superclass

* add changelog

* refactor

* Organize tests

* Use addBlockStatementFirstComment

* Amend unstableTests list

* Avoid identical comments in tests

* Add tests for `implements`

* Handle comments in interfaces

* Remove an always-false condition

* Almost a fix

* Further fixes

* Add DeclareClass

* Add DeclareInterface, mixins

* Fix extends in DeclareClass

* Fix DeclareClass

* Fix mixins

* Refactor: remove unused parameters

* Add marked dangling comments

* Unify printing of interface for TS and Flow

* Fix unstable interfaces

* Remove comment

* Restore the original behavior for interfaces with multiple inheritance

* Refactoring, tests

* Remove unused code

* Include a file accidentally omitted from the merge commit

* Remove unused type import
2020-05-24 21:53:29 +03:00
Georgii Dolzhykov caeb367c16 Playground: autofold for Markdown and other languages (#8331) 2020-05-18 12:15:00 +03:00
Georgii Dolzhykov c5ece64c21 Playground: fix how React is imported (#8332)
see https://twitter.com/sebmarkbage/status/1250284377138802689
2020-05-18 12:14:43 +03:00
Georgii Dolzhykov 382450172c Playground: add Prettier version to document title (#8333) 2020-05-18 12:14:23 +03:00
Georgii Dolzhykov 5dcadf43ab Fix babel-ts to emit a proper syntax error for (a:b) (#8046) 2020-05-16 02:48:45 +03:00
Georgii Dolzhykov b1791e0def refactor(css): calculate correct location data for value-* nodes (#8266)
* calculate correct loc for value-* nodes

* update clean.js to fix idempotence tests
2020-05-16 02:48:25 +03: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
Georgii Dolzhykov dee69aa1bb Add tests to close some issues - part 2 (#8290)
* tests for JSX comments, #1463

* add a test for #2761

* add a test for #3878
2020-05-12 14:29:37 +03:00
Georgii Dolzhykov ddd6001520 Treat <select> and <optgroup> as inline-block for whitespace sensitivity (#8275) 2020-05-11 14:13:40 +03:00
Georgii Dolzhykov 746fee6fef Add tests to close issues (#8276)
* add tests for #6899

* add tests for #6326

* add tests for #8154
2020-05-11 11:49:04 +03:00
Georgii Dolzhykov ce2114533a Fix extra space after minus in CSS-in-JS (#8255)
* Fix extra space after minus in CSS-in-JS

* add changelog entry
2020-05-08 16:53:36 +03:00
Georgii Dolzhykov 018a5b0803 Workaround optional chaining parser bug in Angular expressions (#8253)
* Workaround optional chaining parser bug in Angular expressions

* add changelog entry

* fix changelog entry
2020-05-08 13:40:16 +03:00
Georgii Dolzhykov 1a3fc0082b Preserve parens around pipes in objects in Angular expressions (#8254) 2020-05-08 13:39:51 +03:00
Georgii Dolzhykov 5a523239df playground: auto-fold some AST nodes (#8225) 2020-05-06 03:35:12 +03:00
Georgii Dolzhykov 9db1d9fae6 add tests from #6259 and #7883 2020-04-23 19:25:42 +03:00
Georgii Dolzhykov bba220ec0f Merge branch 'patch-release' 2020-04-21 20:13:24 +03:00
Georgii Dolzhykov d33f8a3e2c Bump Prettier dependency to 2.0.5 2020-04-21 20:09:17 +03:00
Georgii Dolzhykov 6b22977cb5 Release 2.0.5 2020-04-21 20:05:11 +03:00
Georgii Dolzhykov 3ce819d72f chore: ignore test*.js in eslint and ts configs 2020-04-21 17:00:39 +03:00
Georgii Dolzhykov 299f2cad58 chore: ignore test*.js in eslint and ts configs 2020-04-20 20:06:37 +03:00
Georgii Dolzhykov b66f4af4d8 playground: fix how ranges are rendered (#8086) 2020-04-20 11:52:19 +03:00
Georgii Dolzhykov 58905cdf57 chore: update .gitignore and tsconfig.json
- I often find myself testing formatting on more than one test file, so now files like `test2.js` in the root are ignored.
- Coverage reports contain JS files. `tsc` should ignore them.
2020-04-20 00:45:06 +03:00
Georgii Dolzhykov 5d438e3f25 chore: check "JS:" in title in lint-changelog.js 2020-04-17 03:38:53 +03:00
Georgii Dolzhykov 673f4b02e5 add --embedded-language-formatting to playground 2020-04-16 01:57:15 +03:00
Georgii Dolzhykov f67f65055b Further improve method chain breaking heuristic (#7889) 2020-04-16 00:07:44 +03:00
Georgii Dolzhykov 20f02b06f3 Refactor printer-estree.js: extract printing of member chains and call args to separate files (#8061) 2020-04-15 22:31:08 +03:00
Georgii Dolzhykov 670e069519 clean up website readme, remove old deploy script (#8040) 2020-04-14 19:27:25 +03:00
Georgii Dolzhykov 442b33115f playground: update libs, enable code folding for debug panels (#8039) 2020-04-13 14:59:49 +03:00
Georgii Dolzhykov 048726b4be chore: update .gitignore and tsconfig.json
- I often find myself testing formatting on more than one test file, so now files like `test2.js` in the root are ignored.
- Coverage reports contain JS files. `tsc` should ignore them.
2020-04-12 17:49:50 +03:00
Georgii Dolzhykov 1bfef81206 Fix unexpected GitHub Actions failures (#7980) 2020-04-12 01:36:20 +03:00
Georgii Dolzhykov 8557ea69af Enable GitHub Actions for a patch-release branch (#8009) 2020-04-11 15:18:21 +03:00