Bogdan Chadkin
76bb0226d5
Replace globby with fast-glob ( #12223 )
...
There is already fast-glob used in src/cli/expand-patterns.js
Here I migrate everywhere to it from globby which is a thin wrapper with
a couple of unused here features.
```
du -ck dist
```
17280 kB
17260 kB
2022-02-05 10:24:10 -03:00
fisker Cheung
9691e7bc37
Add acorn parser ( #12172 )
2022-01-28 15:25:30 +08:00
fisker Cheung
07f7ad8c79
Improve shorthand specifier detection ( #11941 )
2021-12-18 11:16:18 +08:00
fisker Cheung
306d009904
Use camelCase cli arguments internally ( #11976 )
2021-12-18 11:11:49 +08:00
fisker Cheung
6317e6557e
Test: Make runPrettier result "thenable" ( #11979 )
2021-12-18 11:10:03 +08:00
fisker Cheung
326f23cd35
Restructure cli files ( #11974 )
2021-12-16 09:21:15 +08:00
Jere Kankaanranta and fisker Cheung
82e6937d50
Added changelog and updated the "first available in" version for singleAttributePerLine ( #11934 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-12-07 14:13:26 +08:00
Jere Kankaanranta
0e42acb49b
feat: added singleAttributePerLine option ( #5501 ) ( #6644 )
2021-12-02 11:46:11 +03:00
fisker Cheung
16b6825172
Make options argument in parsers optional ( #11892 )
2021-12-02 13:56:47 +08:00
Sosuke Suzuki
fb7080f82d
Handle TypeScript 4.5 new file extensions .mts and .cts ( #11721 )
...
* Handle .mts and .cts
* Update integration tests
* Add changelog
2021-10-30 20:56:12 +09:00
Sosuke Suzuki
8c23c58b7e
Enable jest/prefer-to-be ( #11627 )
2021-10-04 07:46:38 +09:00
Sosuke Suzuki and Georgii Dolzhykov
aa63269743
Add new CLI option debug-print-ast ( #11514 )
...
* Add new CLI option debug-print-ast
* Add tests
* Add changelog
* Remove text from ast
* Update tests/integration/__tests__/debug-print-ast.js
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
* Update tests
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-09-15 21:03:04 +09:00
fisker Cheung and sosukesuzuki
07786bd758
Revert "Revert features for minor" ( #11044 )
...
* Revert "Revert features for minor (#11016 )"
This reverts commit 09d65c35af .
* Update cspell.json
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-08-31 13:40:52 +09:00
4992d97203
Deprecate jsxBracketSameLine option in favour of multi-language bracketSameLine option ( #11006 )
...
* deprecate jsxBracketSameLine in favour of multi-language angleBracketSameLine option
* update docs and snapshots
* update tests to to make them more reviewable
* Rewrite angular tests
* Rewrite html tests
* Rewrite vue tests
* Restore unnecessary changes in jsx
* Fix file location
* Test both `true` and `false`
* Revert changes in markdown
* Run tests on all js parsers
* Improve html test
* fix changelog comment
* move bracketSameLine to common options
* mark jsxBracketSameLine as deprecated
* Update changelog_unreleased/html/11006.md
Co-authored-by: fisker Cheung <lionkay@gmail.com >
* Update 11006.md
* fix tests by removing `jsxBracketSameLine` `default` property
* fix style
* Revert docs under website dir
* Add tests for deprecated options
* Fix lint problems
Co-authored-by: fisker Cheung <lionkay@gmail.com >
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-08-31 11:47:50 +09:00
fisker Cheung
776b3ff13d
Recognize zx interpreter ( #11238 )
2021-07-22 09:44:42 +08:00
fisker Cheung
894f841fbd
Style: Enforce extensions ( #11227 )
2021-07-21 09:10:34 +08:00
Sosuke Suzuki and fisker Cheung
4d8871c106
Migrate generate-schema script to ESM ( #11226 )
...
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-07-20 19:25:54 +08:00
fisker Cheung
57616ad865
Enable no-return-await and require-await rule, fix clean-cspell script ( #11079 )
2021-06-16 22:20:47 +08:00
Sosuke Suzuki
3332a28aaf
Update generate-schema script ( #11043 )
...
* Support custom parser and use anyOf
* Update snapshots
2021-06-11 14:04:51 +09:00
fisker Cheung
ce96e4899f
CLI: Fix failure on dir with trailing slash ( #11000 )
2021-06-11 11:03:42 +08:00
Sosuke Suzuki
09d65c35af
Revert features for minor ( #11016 )
...
This reverts commit f8cb785758 .
2021-06-05 18:32:49 +09:00
dependabot[bot] and fisker Cheung
ddcfdd47f3
Build(deps): Bump linguist-languages from 7.14.0 to 7.15.0 ( #10990 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-06-01 10:29:22 +08:00
fisker Cheung
c286d847d9
Remove more Array#reduce() ( #10907 )
2021-05-24 01:26:00 +03:00
Doma and fisker Cheung
f8cb785758
Support stylelintrc ( #10924 )
...
* Infer JSON/YAML parser for .stylelintrc
* Update test snapshots
* Update src/language-yaml/embed.js
Co-authored-by: fisker Cheung <lionkay@gmail.com >
* Add changelog for stylelintrc support
* Update embed.js
* style: Fix prettier linting problems
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-05-24 01:24:32 +03:00
fisker Cheung
e161350309
Use fsPromises in CLI ( #10852 )
2021-05-12 01:05:54 +08:00
fisker Cheung
b7983971ce
Drop Node.js 10 support for development "build" ( #10842 )
2021-05-11 08:52:38 +08:00
fisker Cheung
6e71422548
Use async APIs in CLI ( #10841 )
...
* Use async API in CLI
* Remove `synchronous-promise`
2021-05-11 01:50:50 +03:00
Georgii Dolzhykov
3d8dc612b5
Bump Prettier dependency to 2.3.0
2021-05-10 00:07:47 +03:00
164a6e2351
Switch CLI to async ( #10804 )
...
* Switch CLI to async
* Rewrite test
* Fix tests
* Comment out failed test
* Comment out failed test
* Fix test
Co-authored-by: Connor Peet <connor@peet.io >
* Update patterns-dirs.js
* Fix `hasRunningCli` flag
* Fix grammar
* Update tests/integration/runPrettier.js
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
Co-authored-by: Connor Peet <connor@peet.io >
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-05-09 15:43:10 +03:00
Sosuke Suzuki
63c744823b
Update babel parser ( #10802 )
...
* Update
* Use error codes instead of error messages
* Update js tests
* Update ts tests
* Add comments
* Remove plugins enabled by default
* update misc error tests
* Remove moduleStringNmaes
* use allowedMessagesCode directly
* Remove some misc tests
* Update snapshots for integration tests
* Add Redeclaration to cspell.json
2021-05-03 12:12:25 +09:00
dependabot[bot] and fisker Cheung
21d4f4e3a9
Build(deps): Bump linguist-languages from 7.13.0 to 7.14.0 ( #10755 )
...
* Build(deps): Bump linguist-languages from 7.13.0 to 7.14.0
Bumps [linguist-languages](https://github.com/ikatyang/linguist-languages ) from 7.13.0 to 7.14.0.
- [Release notes](https://github.com/ikatyang/linguist-languages/releases )
- [Commits](https://github.com/ikatyang/linguist-languages/compare/v7.13.0...v7.14.0 )
Signed-off-by: dependabot[bot] <support@github.com >
* Update snapshot
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-04-26 01:11:35 +03:00
fisker Cheung
ece93681f1
Restructure test files ( #10415 )
2021-04-25 20:01:56 +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
James Long
00fad62c91
Regenerate snapshots
2017-01-11 10:16:38 -05: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
6715abca76
Tweak variable declaration printing
2016-12-30 11:56:42 -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