Commit Graph
2043 Commits
Author SHA1 Message Date
Sosuke Suzuki 1645e7a9c4 Update to babel/parser 7.15.0 (#11310)
* Update to babel/parser 7.15

* Avoid plugin conflicts

* Remove allowAwaitOutsideFunction

* Add remove private-in

* Update tests for top-level-await

* Update typescript tests

* Handle bar style record/tuple

* Update tests

* Use appendPlugin

* Dont consider about bar style record and tuple

* Revert appendChild

* Update appendPlugins
2021-08-05 19:14:42 +09:00
Sosuke Suzuki b6fd414918 Count correctly regex literals in method chain arguments (#11299)
* Use getStringWidth instead of String length

* Add changelog

* Fix changelog
2021-08-02 14:15:07 +09:00
Sosuke Suzuki 0792cf9604 Fix formatting intersection types that includes mapped types (#11247)
* Treat TSMappedType as object types

* Add tests

* Add changelog
2021-07-27 00:49:24 +09:00
Sosuke Suzuki 1ecae48ae8 Support parenthesized tagged template literals for styled components (#11246)
* Support parenthesized styled.property

* Add changelog

* Fix changelog
2021-07-25 18:16:25 +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 Suzukiandfisker 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 10053999d7 Update meriyah to v4.2.0 (#11194) 2021-07-12 14:45:33 +08:00
09222ed6e8 Build(deps): Bump espree from 7.3.1 to 8.0.0 (#11162)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-07-07 18:53:09 +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 82687f1c02 Print override modifier for parameter property (#11074)
* Install new typescript-estree

* Print override modifier for parameter property

* Add tests

* Add changelog

* Fix by Prettier

* Update babel-parser

* Update snapshot

* Update snapshots
2021-06-15 15:28:31 +09:00
dependabot[bot] 4672b21177 Build(deps): Bump @babel/parser from 7.14.4 to 7.14.5 (#11065) 2021-06-13 17:08:22 +00:00
George Zahariev 14188aea7d Fix handling of parenthesis with {Optional}IndexedAccess (#11051) 2021-06-13 03:48:49 +09: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
Klaus Hott Vidal b5eba9475f remove tests folder from path (#11035) 2021-06-07 17:32:22 +08:00
Klaus Hott Vidal 32b13b3972 Small detail in tests config (#11034) 2021-06-07 13:35:46 +08:00
Sosuke Suzuki 09d65c35af Revert features for minor (#11016)
This reverts commit f8cb785758.
2021-06-05 18:32:49 +09:00
Cyrille David 3cd28ca80d Preserve attributes order for element node (#10958)
* Preserve attributes order for element node

* Add CHANGELOG

* Add ...arguments in the test

* Apply fisker suggestions

* Simplify further
2021-06-04 13:54:02 +03:00
dependabot[bot]andfisker 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
Sosuke Suzuki 3ec9414ae9 Fix order of override modifiers (#10961)
* Fix modifiers order

* Add tests

* Add changelog
2021-05-30 23:50:33 +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
Georgii Dolzhykov 3616182508 Fix incorrectly wrapped arrow functions with return types (#10940) 2021-05-25 10:39:51 +03:00
Sosuke Suzuki 06065bf49b Support TypeScript 4.3 (#10945)
* Update deps

* Add tests

* Add changelog
2021-05-25 10:39:32 +03:00
fisker Cheung c286d847d9 Remove more Array#reduce() (#10907) 2021-05-24 01:26:00 +03:00
Sosuke Suzuki c40a0cf2b8 Add heuristics to detect assignments whose id has complex type annotations (#10916) 2021-05-24 01:24:56 +03:00
Domaandfisker 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
Jed Fox 261bb0314f Fix repositioning the cursor at the end of a range format (#10938)
* Adjust the upper bound on cursorOffset when range formatting

* fix implementation

* Add changelog entry

* Update changelog entry to use PR number
2021-05-24 02:49:49 +09:00
tkalmarandGeorgii Dolzhykov fbca25cf8b Allow : as class prefix-delimeter (#10906)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2021-05-21 18:21:28 +08: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
Philip Davies bcd62546c2 Fix #5599, long yaml keys trigger explicit mapping (#10874)
Fix #5599, long yaml keys trigger explicit mapping
2021-05-15 14:03:06 +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
fisker Cheung 877e64c046 Fix missing parentheses on async inside for..of (#10781) 2021-05-06 16:53:48 +03:00
Sosuke Suzuki 711c6d0d27 Support typescript 4.3 via babel (#10811)
* Suppor type members get/set

* Add tests for static index signature in class

* Support override modifier in class

* Add changelog
2021-05-05 22:32:51 +03:00
Sosuke Suzuki edc7a30f26 Support async do expressions proposal (#10813)
* Support async-do-expression proposal

* Add more tests

* Add changelog
2021-05-05 22:32:26 +03: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
dependabot[bot]andsosukesuzuki e29457c952 Build(deps): Bump @babel/parser from 7.14.0 to 7.14.1 (#10819)
* Build(deps): Bump @babel/parser from 7.14.0 to 7.14.1

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.14.0 to 7.14.1.
- [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.14.1/packages/babel-parser)

Signed-off-by: dependabot[bot] <support@github.com>

* Update tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sosukesuzuki <aosukeke@gmail.com>
2021-05-05 20:48:00 +03:00
George Zahariev 1bcaf61557 Support for Flow's Optional Indexed Access type (#10788) 2021-05-03 22:22:27 +09: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
Sosuke Suzuki 6b204193c0 Improve formatting for Module Blocks Proposal (#10758)
* Improve

* Add tests

* Fix tests

* Detect specified option object expression
2021-04-27 12:11:53 +09:00
TJ Mazeikaandfisker Cheung 7e4f4d5fe6 Exclude @keyframes params from being parsed as a Less variable (#10773)
* Exclude @keyframes params from being parsed as a Less variable

* Update changelog_unreleased/css/10773.md

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

* Update changelog_unreleased/css/10773.md

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

* Add "keyframes" to cspell.json

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-04-26 01:13:40 +03:00
dependabot[bot]andfisker 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
dependabot[bot] 5d1ba827c6 Build(deps): Bump @babel/parser from 7.13.15 to 7.13.16 (#10750) 2021-04-25 10:46:41 +00:00
Georgii Dolzhykovandfisker Cheung bc90973cad Avoid arg expansion that leads to broken code (#10712)
* Avoid arg expansion that leads to broken code

* Preserve new lines and only take comments into account if they break lines

* Add robustness against path state corruption due to throwing

* Refactor

* Remove redundant logic

It solved the same issue but only partially.

* Simplify further

* Refactor path.try, fix callParent issue

* Minor refactoring

* Add istanbul ignore comment

* Add return to AstPath#try

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

Co-authored-by: fisker Cheung <lionkay@gmail.com>
2021-04-20 15:02:11 +03:00