fisker Cheung
d725261fc5
MDX: fix unstable format when embedded off ( #8825 )
2020-07-25 02:06:22 +08:00
fisker Cheung
9ebe5adb54
Ensure comments for ignored node are printed ( #8777 )
2020-07-20 09:19:40 +08:00
dependabot[bot] and fisker
f0285dc3d2
Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5 ( #8762 )
...
* Build(deps): Bump @babel/parser from 7.10.4 to 7.10.5
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.10.4 to 7.10.5.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.10.5/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com >
* Revert changes from #8688
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2020-07-15 14:58:58 +03:00
dependabot[bot] and fisker
35ac6f0752
Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4 ( #8688 )
...
* Build(deps): Bump @babel/parser from 7.10.3 to 7.10.4
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.10.3 to 7.10.4.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.10.4/packages/babel-parser )
Signed-off-by: dependabot[bot] <support@github.com >
* Add `delete obj?.#x.a` test
* Add new `tuple` and `record` tests. Fix old test
* Fix test
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2020-07-02 08:02:36 +08:00
dependabot[bot] and fisker
1802a6f6c4
Build(deps): Bump flow-parser from 0.127.0 to 0.128.0 ( #8661 )
...
* Build(deps): Bump flow-parser from 0.127.0 to 0.128.0
Bumps [flow-parser](https://github.com/facebook/flow ) from 0.127.0 to 0.128.0.
- [Release notes](https://github.com/facebook/flow/releases )
- [Changelog](https://github.com/facebook/flow/blob/master/Changelog.md )
- [Commits](https://github.com/facebook/flow/compare/v0.127.0...v0.128.0 )
Signed-off-by: dependabot[bot] <support@github.com >
* Fix tests
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2020-06-30 13:36:34 +03:00
fisker Cheung
3e44061f84
SCSS: Fix broken comments between declaration prop and value ( #8366 )
2020-06-09 18:41:16 +03:00
fisker Cheung
2b68f981fd
Babel: support record and tuple syntax ( #8453 )
2020-06-03 09:35:13 +08:00
fisker Cheung
7d2e57c67f
Babel: support moduleAttributes ( #8436 )
2020-06-02 20:31:33 +08:00
fisker Cheung
e143e58545
JS: clean up babel plugins ( #8435 )
2020-05-29 09:26:52 +08:00
fisker Cheung
12d379d29d
Test: visualize the range ( #8420 )
2020-05-28 01:16:52 +08:00
dependabot-preview[bot] and fisker
c7ad0756b0
Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1 ( #8413 )
...
* Bump @typescript-eslint/typescript-estree from 2.34.0 to 3.0.1
Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree ) from 2.34.0 to 3.0.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases )
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/CHANGELOG.md )
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.0.1/packages/typescript-estree )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* Fix bigint print
* Add error tests on `dynamic-import`
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2020-05-27 18:56:40 +09:00
fisker Cheung
555df90c55
Update yaml-unist-parser to v1.2.1 ( #8386 )
2020-05-25 18:28:49 +08:00
fisker Cheung
f2c1d70918
JS: pragma support files with shebang ( #8376 )
2020-05-23 19:28:05 +08:00
fisker Cheung
243a06f073
Test: correct file extensions ( #8362 )
2020-05-21 21:10:00 +08:00
Sosuke Suzuki
b94e41aae4
Vue: Support Vue DOM template formatting ( #8326 )
2020-05-18 21:22:30 +08: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
Sosuke Suzuki
531b7ca139
Vue: improve parsing custom blocks with angular-html-parser@1.5.0 ( #8153 )
...
* Parse twice for vue
* Remove 'html' from vueRootElementsSet
* Add link for Vue SFC spec
* Modify to don't format pug code
* Add changelog
* Fix typo
* Change lang, pug => unknown in tests
* Support top-level html
* Refactor shouldParseAsHTML
* Fix multiple template formatting
* Tiny fix
* Fix by Lint
* Remove console.log
* Support nested template tag
* Meke expected syntax errors
* Update tests
* Support unclosed node
* Update to angular-html-parser@1.7.0
* Update
* Remove failed tests
* Modify to throw first parsing error
* Remove options for error tests
* Optimize parse
* Fix reviewed points
* Fix by lint
2020-05-14 22:08:40 +08:00
dependabot-preview[bot] and fisker
b5f39481aa
Bump typescript from 3.8.3 to 3.9.2 ( #8293 )
...
* Bump typescript from 3.8.3 to 3.9.2
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 3.8.3 to 3.9.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* Add Invalid JSX test
* More tests
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com >
2020-05-14 00:12:37 +03:00
fisker Cheung
2c8b419837
Test: Fix parsers ( #8278 )
2020-05-12 19:21:47 +08:00
fisker Cheung
aa2c003aa2
Support HTML-like Comments(only in html) ( #8173 )
2020-05-08 21:37:59 +08:00
fisker Cheung
7ad515111e
Categorize tests part 4(CSS, flow, misc) ( #8251 )
2020-05-08 01:29:34 +08:00
Christopher Chedeau
3375cfe605
Move tests around ( #454 )
...
* new_tests
* move_all_clobbered_tests
* remove all the tests that no longer exist
* re-run flow tests
* Move all the flow tests to tests/flow and prettier to tests/
* Move prettier tests to their own folders
* Add jsfmt files
* run prettier snapshot tests
2017-01-24 14:35:37 -08:00
Christopher Chedeau
e13bb7dbba
[RFC] Do not put spacing inside of arrays with bracketSpacing option enabled ( #446 )
...
Given the discussion on #296 , it seems like there's debate between spaces around `{}` but no one puts spaces around `[]`. So changing the behavior to respect this.
2017-01-24 11:38:12 -08:00
Christopher Chedeau
fb52e7a5c8
Do not put a newline on empty {} for functions ( #447 )
...
The original intent of it was for `if then else` and `try catch` as they aren't likely to be empty, but it accidentally caught function bodys, which have many valid reasons to be empty. Let's special case those out.
2017-01-24 12:37:01 -05:00
Christopher Chedeau
74bc9e7a4d
Add newline for empty blocks {} ( #205 )
...
I find it weird to put `{}` together. So I figured I would change it to have an empty line and ask for feedback :)

Beware: most of the test cases are not representative of real code, you almost never define blocks with no content in practice.
2017-01-16 11:31:32 -05:00
James Long
00fad62c91
Regenerate snapshots
2017-01-11 10:16:38 -05:00
James Long
d2d6def9be
Revert "fixes #49 : omit new parens when it has no arguments"
...
This reverts commit b5392f9468 .
2017-01-10 18:53:03 -05:00
Michael Ficarra
b5392f9468
fixes #49 : omit new parens when it has no arguments
2017-01-10 11:14:39 -08:00
James Long
a4643f1bae
Add special case for comment at top of file; regenerate snapshots
2017-01-09 21:49:26 -05:00
James Long
bcd44b4368
Keep blank lines from original source
2017-01-09 09:46:09 -05:00
James Long
37601b0a86
Update snapshots
2017-01-01 20:20:45 -05:00
James Long
c9e24eb477
Add spaces around certain statements, add --write option, and more
2016-12-30 23:01:07 -05:00
James Long
6715abca76
Tweak variable declaration printing
2016-12-30 11:56:42 -05:00
James Long
11a01552a4
Lots of bug fixes (will do smaller commits from now on)
2016-12-30 00:01:44 -05:00
James Long
88dc2681f6
Make all tests pass the crash test and fix a few more bugs
2016-12-27 21:40:04 -05:00
James Long
9acd34d67d
update snapshots
2016-12-27 13:29:31 -05:00
Christopher Chedeau
cf45afba61
Add testing
...
- This brings in the flow test suite that contains a ton of JavaScript parsing edge cases
- This creates snapshot tests using the pretty printer for all of them
- If uncomment `RUN_AST_TESTS` line in `tests/run_specs.js`, it checks ast(pretty_print(x)) == ast(x). Right now, "178 failed, 197 passed, 375 of 377 total". So half of the tests are not passing, most of them are crashes and many of the rest are subtle issues.
2016-12-23 19:51:53 +00:00