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
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
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
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
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 Nijmeijer and Hendrik 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
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
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
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
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
16b6825172
Make options argument in parsers optional ( #11892 )
2021-12-02 13:56:47 +08:00
Lucas Duailibe
d3dfb74cab
[handlebars] Named blocks can't be self closing ( #11900 )
2021-12-01 22:26:00 -03:00
Sosuke Suzuki and fisker 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
dependabot[bot] and fisker Cheung
2c9adaed39
Build(deps): Bump lines-and-columns from 1.1.6 to 2.0.3 ( #11861 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-11-29 10:06:40 +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
James Long and fisker Cheung
6bf6b20aed
Reverts #7865 , keeping class names on the same line ( #11827 )
...
* Reverts #7865 , keeping class names on the same line
* Add changelog
* Fix lint
* Fix
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-11-18 16:10:41 +09:00
Titus and sosukesuzuki
cca8469388
Add support for MDX 2 comments ( #11563 )
...
* Add support for MDX 2 comments
This adds support for MDX 2 comments (which are the same as other
comments inside JSX) in addition to MDX 1 comments (HTML-like
constructs).
Related to GH-10706.
Related to wooorm/xdm#61 .
* Fix blank line before comment
* Add `esComment` to `printer-markdown`
* Add embedded test
* Remove embedded formatter
* Add support for es-comments as blocks & test prettier-ignore comments
* Add a test for mdx pragma
* Remove duplicate fixture
* Add changelog
* Add note clarifying support
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-11-17 16:49:19 +09:00
Georgii Dolzhykov and sosukesuzuki
11e43e2e17
Avoid extra offset in arrow function body when using long types (alternative solution) ( #11515 )
...
* Avoid extra offset in arrow function body when using long types
* Rename var
* Handle object types properly
* Refactor, add test
* Don't try to keep arrow signatures on one line
Regression testing showed that this was a bad idea in this case
* Add changelog
* Break lhs if it's breakable and rhs is arrow fn
* Reuse isArrowFunctionVariableDeclarator
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-11-17 16:24:16 +09:00
Sosuke Suzuki
9e1038c0eb
Support TypeScript 4.5 syntax ( #11813 )
...
* Update dependencies
* Add tests for type-only module specifiers
* Add tests for ts import assertions
* Add tests for ts private-fields-in-in
* Update changelog
* Update misc tests
* Update SYNTAX_KIND_PROPERTY_DEFINITION
* List typescript from error list
2021-11-16 10:15:08 +09:00
Sosuke Suzuki
8f7c2f77a4
Respect spacing for between expressions and parentheses in embedded CSS ( #11800 )
...
* Fix embedded css formatting
* Add changelog
2021-11-12 23:17:29 +09:00
fisker Cheung
ffbd04ebe2
Fix typo in filename ( #11792 )
2021-11-09 15:36:42 +09:00
Sosuke Suzuki and fisker Cheung
aab66b846b
Add more tests, update changelog ( #11779 )
...
* Update changelog
* Fix
* Add more tests
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2021-11-08 22:52:20 +09:00
Sosuke Suzuki
6a0995040d
Ignore strict errors by @babel/parser ( #11778 )
...
* Ignore StrictEvalArguments
* Ignore EvalArgumentsBinding
* Igngore StrictFunction
* Updates tests for binding eval
* Updates tests for eval
* Update changelog
* Address review
2021-11-08 15:14:20 +09:00
fisker Cheung
9440b70563
Fix error on deleting variables ( #11750 )
...
* Fix error on delete variables [skip ci]
* Add changelog
2021-11-06 22:06:30 +09:00
Sosuke Suzuki
2eb7cdd613
(only babel-ts) Support TypeScript 4.5 type-only module specifiers ( #11723 )
...
* Support TypeScript 4.5 type-only module specifiers
* Add tests
* Update changelog
2021-10-30 21:52:49 +09: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
db0e9d228d
Fix @forward with formatting error ( #11683 )
...
* Resolves #11636 . Added null check for iPrevNode
* undefined check
* Add changelog
* Add tests
* Update tests
* Update changelog
Co-authored-by: Sriram Arul <sriram.arul@zohocorp.com >
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-10-29 18:16:50 +09:00
Sosuke Suzuki
6f602d1126
Fix formatting for tagged template decorators ( #11717 )
...
* Fix formatting for tagged template decorators
* Add changelog
2021-10-25 21:23:42 +09:00
Sosuke Suzuki
65e01b7c03
Update typescript-estree to 5.x ( #11676 )
...
* Remove useJSXTextNode
* Replace TSAbstractClassProperty to TSAbstractPropertyDefinition
* Throw syntax error for inalid abstract property
* Support PropertyDefinition for quoted props
* Refactor postprocess
* Add tests for removing TSParenthesizedType
* Install new ts-estree
* Remove unused handling TSPrivateIdentifier
* Fix lint problem
* Address review
2021-10-20 15:13:02 +09:00
Sosuke Suzuki
7c6d0e462b
Keep trailing commas for type parameters in embedded TSX ( #11685 )
...
* Keep trailing comma for embedded tsx
* Fix
* Add changelog
* Use dummy filepath
2021-10-19 16:15:05 +09:00
Sosuke Suzuki
79fa4f9383
Improve with (...) formatting ( #11637 )
...
* Null checking
* Improve configuration formatting
* Add tests
* Add changelog
* Format
2021-10-19 15:31:53 +09:00
Sosuke Suzuki
8c23c58b7e
Enable jest/prefer-to-be ( #11627 )
2021-10-04 07:46:38 +09:00
Sosuke Suzuki and dependabot[bot]
fb7451a1a2
Support right precedence hack-style pipeline ( #11557 )
...
* Build(deps): Bump @babel/parser from 7.15.5 to 7.15.7
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.15.5 to 7.15.7.
- [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.15.7/packages/babel-parser )
---
updated-dependencies:
- dependency-name: "@babel/parser"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Build(deps): Bump @babel/parser from 7.15.5 to 7.15.6
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.15.5 to 7.15.6.
- [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.15.6/packages/babel-parser )
---
updated-dependencies:
- dependency-name: "@babel/parser"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* tmp
* paren
* tmp
* Return parts simply
* Recursive for hack pipe
* Update tests
* Revert shouldFlatten
* Revert needs-parens
* Fix
* Fix lint problems
* Update error message
* Fix isEnabledHackPipeline logic
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-02 11:34:32 +09:00
bmaehr
5d774dc667
Fix mustache quotes inside attribute ( #10419 ) ( #11524 )
...
* Fix mustache quotes inside attribute (#10419 )
* Add changelog (#10419 )
* Update changelog (#10419 )
* Updated tests
* Updated tests
* Opimize performance
* Don't format changlog
* Remove additional example
2021-09-28 06:02:59 +09:00
Kevin Gibbons and Sosuke Suzuki
b86d36a28b
fix parentheses around sequence expression as body of arrow chain ( #11593 )
...
* fix parentheses around sequence expression as body of arrow chain
* add changelog
* lint
* Update changelog_unreleased/javascript/11593.md
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2021-09-28 05:15:17 +09:00
dependabot[bot] and sosukesuzuki
1a5f430f05
Build(deps): Bump flow-parser from 0.159.0 to 0.160.0 ( #11544 )
...
* Build(deps): Bump flow-parser from 0.159.0 to 0.160.0
Bumps [flow-parser](https://github.com/facebook/flow ) from 0.159.0 to 0.160.0.
- [Release notes](https://github.com/facebook/flow/releases )
- [Changelog](https://github.com/facebook/flow/blob/main/Changelog.md )
- [Commits](https://github.com/facebook/flow/compare/v0.159.0...v0.160.0 )
---
updated-dependencies:
- dependency-name: flow-parser
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* Add flow to import-meta tests
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-09-20 20:53:42 +09:00
Ivan Nikolić and Georgii Dolzhykov
59b5eb4e1f
Fix wildcard syntax in @forward ( #11482 ) ( #11487 )
...
* Fix wildcard syntax in `@forward` (#11482 )
* Add additional tests
* Apply suggestions from code review
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
2021-09-16 14:08:03 +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
0cc8e96c37
Refactor installPrettier ( #11476 )
2021-09-09 18:53:31 +08:00
Ivan Nikolić and sosukesuzuki
1c4da1e441
Consistently quote Sass modules strings ( #11461 )
...
* Consistently quote Sass modules strings
Fixes #11053 .
* Add module rule name check function
* Add more tests for `@use` and `@forward`
* Lint changelog
* Lint files
Co-authored-by: sosukesuzuki <aosukeke@gmail.com >
2021-09-09 13:18:12 +09:00
Sosuke Suzuki
2bbe331f64
Regenerate lockfile ( #11458 )
...
* Regenerate yarn.lock
* Fix tests
* Add yarn.lock to workflow paths
2021-09-07 13:10:54 +09:00