Commit Graph
121 Commits
Author SHA1 Message Date
fisker Cheung 52c9a20e2c Merge branch 'main' into next
# Conflicts:
#	package.json
#	src/cli/index.js
#	tests/config/install-prettier.js
#	tests/format/yaml/block-literal/jsfmt.spec.js
#	tests/integration/__tests__/file-info.js
#	yarn.lock
2022-02-21 16:12:59 +08:00
fisker Cheung da7eb9aa60 Remove duplicated location info in error message from meriyah parser (#12307) 2022-02-16 08:24:53 +08:00
Yosuke Kuramiandfisker Cheung f21d18aab9 fix(yaml): Don't remove lines including U+3000 (#12305)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-02-15 21:02:04 +08:00
Sosuke Suzuki 8c49fd0f6f Support destructuring private proposal (#12276)
* Enable `destructuringPrivate` plugiin

* Add tests

* Add changelog

* Add more tests
2022-02-14 11:28:47 +09:00
fisker Cheung be0739ec22 Add type:"module" to package.json (#12272) 2022-02-12 15:39:16 +08:00
fisker Cheung 9303d84697 Merge branch 'main' into next
# Conflicts:
#	src/language-css/parser-postcss.js
#	tests/integration/__tests__/arg-parsing.js
#	tests/integration/__tests__/check.js
#	tests/integration/__tests__/config-invalid.js
#	tests/integration/__tests__/config-resolution.js
#	tests/integration/__tests__/cursor-offset.js
#	tests/integration/__tests__/debug-check.js
#	tests/integration/__tests__/debug-print-ast.js
#	tests/integration/__tests__/debug-print-comments.js
#	tests/integration/__tests__/debug-print-doc.js
#	tests/integration/__tests__/early-exit.js
#	tests/integration/__tests__/error-on-unmatched-pattern.js
#	tests/integration/__tests__/file-info.js
#	tests/integration/__tests__/help-options.js
#	tests/integration/__tests__/ignore-absolute-path.js
#	tests/integration/__tests__/ignore-emoji.js
#	tests/integration/__tests__/ignore-in-subdirectories.js
#	tests/integration/__tests__/ignore-path.js
#	tests/integration/__tests__/ignore-relative-path.js
#	tests/integration/__tests__/ignore-unknown.js
#	tests/integration/__tests__/ignore-vcs-files.js
#	tests/integration/__tests__/infer-parser.js
#	tests/integration/__tests__/invalid-ignore.js
#	tests/integration/__tests__/line-suffix-boundary.js
#	tests/integration/__tests__/list-different.js
#	tests/integration/__tests__/loglevel.js
#	tests/integration/__tests__/parser-api.js
#	tests/integration/__tests__/patterns-dirs.js
#	tests/integration/__tests__/patterns-glob.js
#	tests/integration/__tests__/patterns.js
#	tests/integration/__tests__/piped-output.js
#	tests/integration/__tests__/plugin-default-options.js
#	tests/integration/__tests__/plugin-extensions.js
#	tests/integration/__tests__/plugin-flush-line-suffix.js
#	tests/integration/__tests__/plugin-options-string.js
#	tests/integration/__tests__/plugin-options.js
#	tests/integration/__tests__/plugin-precedence.js
#	tests/integration/__tests__/plugin-preprocess.js
#	tests/integration/__tests__/plugin-resolution.js
#	tests/integration/__tests__/plugin-virtual-directory.js
#	tests/integration/__tests__/skip-folders.js
#	tests/integration/__tests__/stdin-filepath.js
#	tests/integration/__tests__/support-info.js
#	tests/integration/__tests__/syntax-error.js
#	tests/integration/__tests__/with-config-precedence.js
#	tests/integration/__tests__/with-node-modules.js
#	tests/integration/__tests__/with-parser-inference.js
#	tests/integration/__tests__/with-shebang.js
#	tests/integration/__tests__/write.js
2022-02-10 10:52:10 +08:00
Lucas Duailibe 1dffa0f9da Improve printing of comments in type aliases (#12268) 2022-02-09 23:02:47 -03:00
fisker Cheung 1b6388e9b1 Fix 2022-02-09 10:08:32 +08:00
fisker Cheung f0b63f3dff Merge branch 'main' into next
# Conflicts:
#	CONTRIBUTING.md
#	cspell.json
#	docs/options.md
#	package.json
#	scripts/build/bundler.mjs
#	src/language-css/loc.js
#	src/language-css/parser-postcss.js
#	src/language-css/utils/index.js
#	tests/format/js/arrows-bind/jsfmt.spec.js
#	tests/format/js/async-do-expressions/jsfmt.spec.js
#	tests/format/js/bind-expressions/jsfmt.spec.js
#	tests/format/js/classes/top-level-super/jsfmt.spec.js
#	tests/format/js/comments-pipeline-own-line/jsfmt.spec.js
#	tests/format/js/decorator-comments/jsfmt.spec.js
#	tests/format/js/decorators-export/jsfmt.spec.js
#	tests/format/js/decorators/jsfmt.spec.js
#	tests/format/js/do/jsfmt.spec.js
#	tests/format/js/export-default/escaped/jsfmt.spec.js
#	tests/format/js/export-extension/jsfmt.spec.js
#	tests/format/js/export-star/jsfmt.spec.js
#	tests/format/js/exports/jsfmt.spec.js
#	tests/format/js/invalid-code/jsfmt.spec.js
#	tests/format/js/logical-assignment/jsfmt.spec.js
#	tests/format/js/multiparser-invalid/jsfmt.spec.js
#	tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js
#	tests/format/js/object-property-comment/jsfmt.spec.js
#	tests/format/js/partial-application/jsfmt.spec.js
#	tests/format/js/pipeline-operator/jsfmt.spec.js
#	tests/format/js/private-in/jsfmt.spec.js
#	tests/format/js/record/jsfmt.spec.js
#	tests/format/js/reserved-word/jsfmt.spec.js
#	tests/format/js/strings/jsfmt.spec.js
#	tests/format/js/throw_expressions/jsfmt.spec.js
#	tests/format/js/trailing-whitespace/jsfmt.spec.js
#	tests/format/js/v8_intrinsic/jsfmt.spec.js
#	tests/format/misc/errors/js/literal/jsfmt.spec.js
#	tests/format/misc/errors/js/object/jsfmt.spec.js
#	tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js
#	tests/integration/__tests__/bundle.js
#	tsconfig.json
#	yarn.lock
2022-02-09 09:22:32 +08:00
fisker Cheung 6d02cd9650 Add parens to ClassExpression with decorators (#12260) 2022-02-08 15:06:31 +08:00
dependabot[bot] b1645073b8 Build(deps): Bump @babel/parser from 7.16.12 to 7.17.0 (#12241) 2022-02-07 06:15:31 +00:00
fisker Cheung 717e6d8cb7 Follow up work for flow-parser@0.171.0 (#12252) 2022-02-07 11:24:32 +08:00
Sosuke Suzuki 1f50c8417d Run tests for logical-assignment operators witn flow (#12244) 2022-02-06 21:07:02 +09:00
Lucas Duailibe 69ea417f6b Prevent multiple parenthesis around superclass with typecast (#12226) 2022-02-05 11:56:37 -03:00
Lucas Duailibe e73a7bc47e Preserve comment position before super class (#12222) 2022-02-05 10:50:04 -03:00
Lucas Duailibe 543aa9abf1 Fix printing of SCSS selector() function (#12213) 2022-02-03 12:54:10 -03:00
Lucas Duailibe e22c4911f8 Preserve empty lines in CSS/SCSS paren groups (#12210) 2022-02-02 07:38:59 -03:00
Lucas Duailibe 72ac2bbe5f Fix comment in abstract methods (#12185) 2022-01-29 19:25:53 -03:00
fisker Cheung 9691e7bc37 Add acorn parser (#12172) 2022-01-28 15:25:30 +08:00
Lucas Duailibe f4d9816bc1 Keep comments of default cases in the same line of the case (#12177) 2022-01-28 00:11:28 -03:00
dependabot[bot]andfisker Cheung 249096c749 Build(deps): Bump @babel/parser from 7.16.8 to 7.16.12 (#12126)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2022-01-24 17:29:19 +08:00
Sosuke Suzuki db73cc8e0c Print end-of-line comment for continue/break statements (#12075)
* Add handleBreakAndContinueStatementComments to handleEndOfLineComment

* Add tests

* Add changelog

* Update tests

* Add more tests

* Fix for own line comments

* Fix tests

* Fix tests

* Fix tests

* Add unstable tests
2022-01-19 22:29:37 +09:00
fisker Cheung 27e7376229 Fix hangs on invalid v-for (#12113) 2022-01-19 20:53:17 +08:00
Jed Fox f29a7565e9 Collapse JSXExpressionContainer → AwaitExpression → JSXElement (#12109) 2022-01-16 14:59:22 -05:00
Jed Fox 920283a1dd Inline await expressions in JSX (#12088) 2022-01-15 16:00:39 -05:00
fisker Cheung f1b0ea9386 Fix test 2022-01-14 15:57:17 +08:00
fisker Cheung c0fafdce78 Merge branch 'main' into next 2022-01-14 15:51:35 +08:00
Sosuke Suzuki 6ccc462409 Print comments for parenthesized TS keyword types (#12070)
* Prefer node.start for TS keyword types

* Add tests

* Add changelog

* Refactor

* Use isTsKeywordType

* Fix lint problems
2022-01-13 09:54:06 +09:00
fisker Cheung 0cfb9d95e4 Merge branch 'main' into next 2022-01-08 22:19:54 +08:00
Sosuke Suzuki a50bc4e14a Preserve end-of-line comment for if statement without blocks (#12017)
* Print as dangling comments

* Add tests

* Add changelog

* Use symbol instead of string
2022-01-06 09:31:58 +09:00
fisker CheungandSosuke Suzuki 6bd81c23b6 Migrate format test to ES Module (#11902)
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2022-01-04 17:00:25 +08:00
dependabot[bot] 2e2f2f50e7 Build(deps): Bump @babel/parser from 7.16.6 to 7.16.7 (#12020) 2022-01-04 07:17:53 +00:00
fisker Cheung 12d8ac32c5 Merge branch 'main' into next
# Conflicts:
#	cspell.json
#	package.json
#	tests/integration/__tests__/early-exit.js
#	yarn.lock
2022-01-04 15:04:40 +08:00
Sosuke Suzuki 66e4597c0e Update acorn (#12039) 2022-01-03 04:22:42 +08:00
George Zahariev 75a02f9bde Fix Flow's class declaration's indexer formatting (#12009) 2021-12-29 00:35:54 -03:00
f8829d8c30 Build(deps): Bump flow-parser from 0.162.1 to 0.168.0 (#11845)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-12-23 11:31:23 +08:00
Hendrik NijmeijerandHendrik Nijmeijer 846069b6c7 recognize waitForAsync as test-statement in Angular (#11992)
* recognize waitForAsync as test-statement in Angular

* Add changelog_unreleased entry

Co-authored-by: Hendrik Nijmeijer <hendrik@hendriknijmeijer.nl>
2021-12-20 17:04:19 -03:00
fisker Cheung 49c6b82517 Merge branch 'main' into next
# Conflicts:
#	package.json
#	tests/integration/__tests__/help-options.js
#	yarn.lock
2021-12-17 10:30:50 +08:00
dependabot[bot] db0604eddd Build(deps): Bump @babel/parser from 7.16.4 to 7.16.6 (#11973) 2021-12-15 02:04:49 +00:00
fisker Cheung 011672669e Merge branch 'main' into next
# Conflicts:
#	package.json
#	yarn.lock
2021-12-07 15:15:42 +08:00
fisker Cheung 7bce1d02c7 Fix comments inside map (#11920) 2021-12-06 21:31:51 +08:00
Trevor Scheer 20f06ccb2a Print descriptions on graphql schema definition nodes (#11901)
* Failing test

* Add description, test passes

* Add changelog entry
2021-12-03 14:42:09 +09:00
Jere Kankaanranta 0e42acb49b feat: added singleAttributePerLine option (#5501) (#6644) 2021-12-02 11:46:11 +03:00
fisker Cheung 81d7ca3926 Merge branch 'main' into next 2021-12-02 14:00:53 +08:00
Lucas Duailibe d3dfb74cab [handlebars] Named blocks can't be self closing (#11900) 2021-12-01 22:26:00 -03:00
fisker Cheung 0d6d47b30a Merge branch 'main' into next
# Conflicts:
#	package.json
#	yarn.lock
2021-12-01 16:35:15 +08:00
Sosuke Suzukiandfisker Cheung e17404eeb1 Improve formatting for empty tuple types (#11884)
* Don't print trailing comma when tuple is empty

* Add tests

* Don't print softline

* Add tests

* Update tests

* Add changelog

* Update changelog_unreleased/typescript/11884.md

Co-authored-by: fisker Cheung <lionkay@gmail.com>

* Fix names

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-11-30 23:48:28 +09:00
fisker Cheung 44c8508e02 Merge branch 'main' into next
# Conflicts:
#	yarn.lock
2021-11-22 11:24:52 +08:00
Sosuke Suzuki 7acdac30db Remove unnecessary parentheses for decorators (#11849)
* Remove unnecesary parans for typescript parser

* Add tests

* Update changelog
2021-11-21 15:54:18 +09:00
fisker Cheung 8a85ba4e18 Update acorn (#11835)
* Update `acorn`

* Fix test, add changelog
2021-11-21 01:44:28 +09:00