Georgii Dolzhykov
f5610b8510
Hug object types in function parameters in Flow like in TS ( #13396 )
2022-08-30 17:38:50 +03:00
fisker Cheung
90d836d5ca
Update tests
2022-08-26 10:35:34 +08:00
fisker Cheung
0b072060b5
Merge branch 'main' into next
...
# Conflicts:
# src/language-js/print/flow.js
# src/language-js/print/literal.js
2022-08-26 10:29:09 +08:00
5a627651ff
fix: line breaks in multiline strings, issue 13157 ( #13274 )
...
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com >
Co-authored-by: Gleb Dolzhikov <gleb.dolzhikov@ix.co >
Co-authored-by: fisker Cheung <lionkay@gmail.com >
2022-08-23 20:56:52 +08:00
Georgii Dolzhykov
17081e6cf6
Support decorated function pattern ( #10714 )
2022-08-08 21:57:19 +03:00
fisker Cheung
83400d19b4
Change default value of trailingComma to "all" ( #11479 )
2022-08-01 11:05:17 +08:00
fisker Cheung
a21dfbfa21
Merge branch 'main' into next-rebase
...
# Conflicts:
# .eslintrc.cjs
# package.json
# scripts/build/bundler.mjs
# scripts/build/config.mjs
# scripts/build/esbuild-plugins/replace-module.mjs
# src/cli/file-info.js
# src/cli/find-config-path.js
# src/cli/index.js
2022-03-24 15:02:29 +08:00
Sosuke Suzuki
becb6c9b74
Fix non-idempotent formatting of function calls with complex type arguments ( #12508 )
...
* Fix
* Add TS tests
* Add Flow tests
* Add changelog
2022-03-23 23:09:58 +09: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 and Sosuke 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
George Zahariev
75a02f9bde
Fix Flow's class declaration's indexer formatting ( #12009 )
2021-12-29 00:35:54 -03:00
Oskari Noppa
6a5efe7fa8
Print semi before Flow variance sigil w/ no-semi ( #11398 )
...
* Print semi before Flow variance sigil w/ no-semi
Fixes #11397 . Omitting semicolon before class property with a Flow
variance sigil `+` or `-` may lead to output that is syntatically
incorrect or has incorrect runtime behaviour.
* Add changelog for PR 11398
* Put semi to the end of previous line
Put the semicolon for Flow class property variance sigil to the end of
the previous line, not at the beginning of the the line where the
variance sigil is.
This approach was suggested in the comments of #11398 .
* Add babel-flow to parser to Flow no-semi specs
As per discussion in PR #11398 , babel-flow parser should also be tested.
* Print semi before private fields w/ variance
* Add private fields to changelog
* Use existing isClassProperty helper
Use existing helper function `isClassProperty` to simplify the conditional
a bit.
Note that this also adds new case, `type === "PropertyDefinition"`, that
would be a match. However, nextNode.type can't be "PropertyDefinition"
in practice, as it's part of estree parser output which doesn't support
Flow. There's no real downside in checking that extra case, though, and
this does simplify the code a bit.
* Add new property tests to the snapshot spec
* Change one of the variance sigils to `-` (contravariant)
* Add one computed property
* Make one of the property values be a function
These cases also require semi in the previous line.
* Add new testcases from previous patch to changelog
* Add variance sigil to computed property in spec
2021-08-30 21:19:05 +09:00
dependabot[bot] and Sosuke Suzuki
29b116b4a1
Build(deps): Bump @babel/parser from 7.15.2 to 7.15.3 ( #11345 )
...
* Build(deps): Bump @babel/parser from 7.15.2 to 7.15.3
Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser ) from 7.15.2 to 7.15.3.
- [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.3/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 >
* Add tests for `@babel/parser` 7.15.3 (#11366 )
* Add tests for babel/babel#13659
* Add tests for babel/babel#13655
* Add tests for babel/babel#13645
* Update tests
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com >
2021-08-19 07:26:12 +08:00
George Zahariev
14188aea7d
Fix handling of parenthesis with {Optional}IndexedAccess ( #11051 )
2021-06-13 03:48:49 +09:00
Sosuke Suzuki
84f72be9dc
Avoid to break after assignment for call expression that has complex type parameters ( #10949 )
...
* Avoid break-after-operator when call expr has complex type params
* Add tests
* Add changelog
* Fix issue number
* Update snapshpts
* Address review
* Support Flow
* Rename parameters => arguments
* Remove isCallExpression
2021-05-28 10:40:33 +09:00
Sosuke Suzuki
c40a0cf2b8
Add heuristics to detect assignments whose id has complex type annotations ( #10916 )
2021-05-24 01:24:56 +03:00
fisker Cheung
4d37ac46a3
Add __babel_estree parser ( #10910 )
2021-05-19 09:22:52 +08:00
Sosuke Suzuki
4b9e881b33
Add heuristics to detect type aliases that has complex typeparameters ( #10901 )
2021-05-19 09:22:33 +08:00
Sosuke Suzuki
3a1512f043
Add tests for indexed access via Babel ( #10812 )
...
* Add tests for optional indexed access via Babel
* Add tests for indexed access via Babel
2021-05-05 20:49:24 +03:00
George Zahariev
1bcaf61557
Support for Flow's Optional Indexed Access type ( #10788 )
2021-05-03 22:22:27 +09:00
fisker Cheung
ece93681f1
Restructure test files ( #10415 )
2021-04-25 20:01:56 +08:00