Commit Graph
1858 Commits
Author SHA1 Message Date
dependabot[bot]andfisker bc9db85490 Build(deps): Bump postcss-less from 3.1.4 to 4.0.0 (#9471)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-10-26 09:46:00 +08:00
fisker CheungandSosuke Suzuki bb31bf481c Refactor function parameters print (#9489)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2020-10-26 09:22:37 +08:00
fisker Cheung 98e85eec74 Test "import assertions" on other parsers (#9475) 2020-10-23 20:44:29 +08:00
fisker Cheung 6fbf38b55b Add parens to object value that it's an assignment (#9484) 2020-10-23 20:43:42 +08:00
Daniel Sainatiandfisker 80a0856107 Support Flow this parameter annotations (#9457)
Co-authored-by: fisker <lionkay@gmail.com>
2020-10-23 20:43:17 +08:00
Sosuke Suzuki 13f3336bba Support class-static-block proposal (#9476)
* Support class-static-block proposal

* Update changelog
2020-10-23 20:09:07 +09:00
Sosuke Suzuki 56e9602a28 Support TypeScript 4.1 via Babel (#9473)
* Support Key Remapping In Mapped Types

* Fix by Prettier

* Add changelog

* Fix jsfmt.spec.js

* Update cspell.json
2020-10-22 21:12:24 +09:00
Sosuke Suzuki 3b7a7ba3c9 Update @babel/parser to 7.12 (#9408)
* Install babel/parser 7.12

* Add tests for babel/babel#12161

* Add test for babel/babel#12076

* Add test for babel/babel#12085

* Add test for babel/babel#12108

* Add test for babel/babel#12120

* Add test for babel/babel#12054

* Add test for babel/babel#12061

* Add test babel/babel#12093

* Add test for babel/babel#12065

* Add test for babel/babel#12111

* Add test for babel/babel#12072

* Switch syntax-module-attributes to syntax-import-assertion

* Support "String import/export specifier"

* Remove tests for module-attributes

* Add changelog

* Update to 7.12.3

* Fix by linter

* Fix by spellchecker

* Add tests for module attributes to errors

* Add error test for module string name with import

* Remove TSTypeCastExpression

* Add tests for funny import-assertions

* Update snapshots|

* Add more tests
2020-10-20 19:01:30 +09:00
George Zahariev d59a107f4a Support Flow Enums with unknown members (#9432) 2020-10-20 14:40:18 +08:00
fisker Cheung 140cb14f3a JS: Fix import {a as a} and export {a as a} format (#9435) 2020-10-20 14:38:34 +08:00
fisker Cheung 7d80bae76a Consistent format on invalid template literals (#9431) 2020-10-17 00:51:00 +08:00
fisker Cheung 3fe4666a85 Consistent parser errors (#9406) 2020-10-16 10:39:05 +08:00
3b5f2de176 Build(deps): Bump @glimmer/syntax from 0.62.1 to 0.62.3 (#9403)
Co-authored-by: Cyrille David <dcyriller@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-10-15 19:42:02 +08:00
fisker Cheung 1005954c75 Test: use errors options instead of disableBabelTS (#9387) 2020-10-13 17:16:40 +08:00
fisker Cheung e10aeee5c9 HTML: Fix crash on reading Node.sourceSpan (#9372) 2020-10-13 09:17:57 +08:00
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
Georgii Dolzhykov 633f084a76 LESS: fix comments in value lists (#9356) 2020-10-12 09:16:36 +08:00
Alexander Kachkaev 744638e96b Markdown: Align code block language detection with other tools (#9365) 2020-10-12 09:13:30 +08:00
Ara Adkinsandfisker Cheung 42c1ff3fcf Add support for [[wiki-style]] links in markdown (#9275)
* Add support for [[wiki-style]] links in markdown

1.  Support for [[wiki-style]] links ensures that they do not get broken
    by the prettier formatting by being wrapped over multiple lines.
2.  The contents of the link (between the `[[]]` brackets) are treated
    as raw text. This is because the various tools that rely on the
    `[[]]` syntax do not agree on what is allowable between them.

* Add a changelog document

* Update pr-9275.md

* Add additional tests as requested

* Add a fix for AST tests

* Fix issues with prose-wrap: "preserve"

* Lint

* Add a clean action for wikiLinks

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-10-08 21:51:01 +08:00
Sosuke Suzuki bba196abc8 Improve formatting for AssignmentExpression with ClassExpression that has long superClass (#9341)
* Improve formatting for AssignmentExpression with ClassExpression that has long superClass

Fix by prettier

* Add changelog

* Remove unnecesary concat call

* Mention abount Google Closure Library in changelog
2020-10-08 20:11:15 +09:00
Sosuke Suzuki bb238f5765 Fix placing leading comments for a body of while statement (#9345)
* Add leading comments for while

* Add tests

* Add changelog
2020-10-08 17:08:40 +09:00
Sosuke Suzuki e1eecfd7eb TypeScript: Preserve a last separator for ignored object and interface types (#9318)
* Preserve ignored TypeScript signature

* Add Changelog
2020-10-06 15:09:22 +09:00
fisker CheungandGeorgii Dolzhykov 64cb7abed8 JS: Fix comments inside template (#9278)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-05 05:49:52 +08:00
fisker Cheung 7c5a7d3c74 Markdown: Fix missing blank lines in fenced code block (#8786) 2020-09-30 17:03:14 +08:00
fisker Cheung 9efeb8309e Update postcss-scss to v3 (#9210) 2020-09-27 08:49:16 +08:00
fisker Cheung 50eeaadeca MDX: fix JSX format (#9267) 2020-09-27 08:46:19 +08:00
fisker Cheung b77da32a80 Update postcss to v8 (#9209)
* Update `postcss` v8

* Parser custom properties

* Improve logic

* Update lint script

* Fix node location

* Fix comments inside

* Add a test

* Test on `less` and `scss` too

* Fix empty prop print

* Clean

* Update `postcss`

* Exclude `regenerator`

* Test `no-semi`

* Add changelog

* Typo

* Apply review suggestion

* Style

* Simplify logic

* Remove error test, we don't throw on this anymore

* Style

* Update postcss

* Update postcss
2020-09-25 00:51:55 +08:00
Ananda Umamilandfisker fe70b17a9a Vue: Improve v-for format (#9225)
* Vue: break `v-for` around `in` or `of`

* Update changelog

* Minor refactor

Co-authored-by: fisker <lionkay@gmail.com>
2020-09-24 08:00:58 +09:00
fisker Cheung 203be9da5a Change test package name (#8848) 2020-09-18 14:05:29 +08:00
fisker Cheung 94ef5f5683 Test: Fix indexes calculation (#9152)
* Test: Fix indexes calculation

* Simplify logic

* Update snapshots
2020-09-17 07:31:29 +08:00
golergka 7131347cde Typescript tagged template literal test (#9195) 2020-09-14 14:20:24 +03:00
dependabot[bot]andfisker 116727b3b6 Build(deps): Bump yaml-unist-parser from 1.3.0 to 1.3.1 (#9169)
* Build(deps): Bump yaml-unist-parser from 1.3.0 to 1.3.1

Bumps [yaml-unist-parser](https://github.com/ikatyang/yaml-unist-parser) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/ikatyang/yaml-unist-parser/releases)
- [Changelog](https://github.com/ikatyang/yaml-unist-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ikatyang/yaml-unist-parser/compare/v1.3.0...v1.3.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Update snapshot

* Update changelog

* spellcheck

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-10 21:30:40 +08:00
fisker Cheung 4de63cfc4f Test: add test for issue 5961 (#9153) 2020-09-07 17:59:50 +03:00
Sosuke Suzukiandfisker 5f9bb2590b YAML: Fix printing doubles a blank line before a comment (#9143)
* Print hardline for endComments only when under mappingValue

* Add changelog

* Fix from linter

* Update tests

* Use shouldPrintEndCommentsWithAlign

* Add tests

* Add test

* Fix format

* Update test

* Test map too

* Update tests

* `shouldPrintEndCommentsWithAlign` -> `shouldPrintEndComments`

Co-authored-by: fisker <lionkay@gmail.com>
2020-09-07 14:10:05 +03:00
fisker Cheung 370844cc4c Run full test on every parser (#9070)
* Refactor test

* Fix

* Improve `hasPragma` & `insertPragma` on files has BOM

* Fix `coreFormat` cursorOffset

* Code style

* Update snapshots

* Refactor

* Restore BOM test

* Add export

* Empty file

* return after SyntaxError

* EOL test

* Fix eol tests

* Named export

* Tweak matrix

* Disable on `requirePragma`

* Disable `cr` test

* Simplify logic

* Update `verbose`

* Remove `test:full-test`

* Typo
2020-09-04 23:43:41 +08:00
dependabot[bot]andfisker 6c05c75e06 Build(deps): Bump flow-parser from 0.132.0 to 0.133.0 (#9135)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-04 16:00:08 +08:00
Sosuke Suzuki 2c0e9838f2 Fix line breaks for CSS in JS (#9136)
* Fix 2.1 regression for css-in-js

* Add changelog
2020-09-04 13:12:58 +09:00
Sosuke SuzukiandGeorgii Dolzhykov 7463b9dd15 GraphQL: Fix formatting for directives in fields (#9116)
* Fix formatting for directives in FragmentDefinition

* Add changelog

* Update src/language-graphql/printer-graphql.js

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>

* Fix by Prettier

* Refactor

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-09-03 02:57:17 +09:00
dependabot[bot]andfisker 0983660aa8 Build(deps): Bump @babel/parser from 7.11.2 to 7.11.5 (#8947)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-01 19:26:19 +08:00
fisker Cheung 01f986bea9 Make isSCSS* function stricter (#9093) 2020-09-01 16:58:35 +08:00
fisker CheungandGeorgii Dolzhykov f5e96f7d83 Redirect babel parser to babel-flow (#9071)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-09-01 11:23:47 +08:00
fisker Cheung 589ebf670b Add pure css parser (#7933) 2020-08-28 13:07:49 +08:00
Sosuke Suzuki cc63358c90 Respect spacing between template values in embedded css (#9078)
* Respect no space for embedded css

* Fix by lint

* Add changelog
2020-08-28 11:08:29 +09:00
fisker Cheung f2e3cb7f3b Support .wxs & .wxss (#9081)
* Support `.wxs` &  `.wxss`

* Spell check

* Add comments

* Spellcheck
2020-08-27 20:56:53 +03:00
fisker Cheung ebe9e07716 Vue: Fix format on self-closing and empty blocks (#9055) 2020-08-26 11:19:34 +08:00
Chris Brody 77c8da7691 test(TypeScript): test ...infer type with parens (#9056) 2020-08-26 09:02:58 +08:00
fisker Cheungandprettifier[bot] ee57066cb4 HTML: Fix format on style[lang="sass"] (#9051)
Co-authored-by: prettifier[bot] <45367598+prettifier[bot]@users.noreply.github.com>
2020-08-26 00:26:03 +08:00
fisker Cheung 073dfd9fa2 Vue: fix format on blocks with src attribute (#9052) 2020-08-25 23:06:25 +08:00
fisker Cheung 720177ac5c HTML: Fix format on files with frontMatter (#9043) 2020-08-25 19:49:38 +08:00
fisker Cheung 9a9dcbe12b Fix broken format for ...infer T (#9044) 2020-08-25 12:36:54 +03:00