Commit Graph
2259 Commits
Author SHA1 Message Date
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
fisker Cheung f5f3cabdfe Refactor JS embed (#9433) 2020-10-22 13:32:10 +08: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
fisker Cheung e10aeee5c9 HTML: Fix crash on reading Node.sourceSpan (#9372) 2020-10-13 09:17:57 +08:00
fisker CheungandGeorgii Dolzhykov 07f6d49ef3 Stop inferring the parser to be json for .jsonl files (#9371)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-10-13 09:17:33 +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
fisker Cheung ba14e7c3f2 CLI: Fix error on dir or file that name is a number (#9298) 2020-10-08 22:00:01 +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
Sosuke Suzuki 16dc1a85f6 Remvoe duplicated condition (#9319) 2020-10-06 10:13:16 +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 47ed40d970 Enable CR test (#9148)
* Enable `CR` test

* Fix tests

* Ignore `standalone.js`
2020-09-17 07:35:33 +08:00
fisker Cheung a5a6ed7872 Switch get-stream to get-stdin (#9149) 2020-09-17 07:32:19 +08:00
Sosuke Suzuki 7174924742 Refactor: Use set instead of array (#9164)
* Use set instead of array

* With WeakMap cache

* Refactor

* Fix typo
2020-09-11 13:16:40 +03:00
dependabot[bot]andfisker ce0b08ab03 Build(deps): Bump linguist-languages from 7.10.0 to 7.11.0 (#9166)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-09 14:18:51 +08: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
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 b87a3d7ffe Refactor RecoveredErrors rethrow (#9075) 2020-09-01 17:29:27 +08:00
fisker Cheung 01f986bea9 Make isSCSS* function stricter (#9093) 2020-09-01 16:58:35 +08:00
fisker Cheung c0bca1805d Remove css parser from isLessParser check (#9092) 2020-09-01 15:28:11 +08:00
fisker Cheung 0aba03062d Remove a unnecessary check in css printer (#9094) 2020-09-01 11:24:58 +08:00
fisker Cheung bd46d5f1bc Glimmer: Use common locationToOffset (#9106) 2020-09-01 11:24:33 +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
Chris Brody cfd6074e44 cleanup: remove extra parent.object conditions (#8878)
from src/language-js/needs-parens.js
2020-08-29 02:03:52 +03: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 c8e7e0b003 Update js languages (#9073) 2020-08-28 10:02:45 +08:00
fisker Cheung f2e3cb7f3b Support .wxs & .wxss (#9081)
* Support `.wxs` &  `.wxss`

* Spell check

* Add comments

* Spellcheck
2020-08-27 20:56:53 +03:00
dependabot[bot]andfisker 1a21ba94e4 Build(deps): Bump editorconfig-to-prettier from 0.1.1 to 0.2.0 (#9067)
* Build(deps): Bump editorconfig-to-prettier from 0.1.1 to 0.2.0

Bumps [editorconfig-to-prettier](https://github.com/josephfrazier/editorconfig-to-prettier) from 0.1.1 to 0.2.0.
- [Release notes](https://github.com/josephfrazier/editorconfig-to-prettier/releases)
- [Commits](https://github.com/josephfrazier/editorconfig-to-prettier/compare/v0.1.1...v0.2.0)

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

* Remove `insertFinalNewline`

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
2020-08-27 06:27:28 +08:00
fisker Cheung ebe9e07716 Vue: Fix format on self-closing and empty blocks (#9055) 2020-08-26 11:19:34 +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 2a15e273a0 Add loc back for typescript parser (#9053) 2020-08-25 23:05:41 +08:00
fisker Cheung 720177ac5c HTML: Fix format on files with frontMatter (#9043) 2020-08-25 19:49:38 +08:00