Commit Graph
2071 Commits
Author SHA1 Message Date
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 Suzukianddependabot[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 GibbonsandSosuke 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]andsosukesuzuki 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ćandGeorgii 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 SuzukiandGeorgii 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ćandsosukesuzuki 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
Sosuke Suzuki bef39f2394 Update @babel/parser to 7.15.4 (#11436)
* Install new babel/parser

* Add tests for static blocks with line breaks
2021-09-04 22:02:30 +09:00
fisker Cheungandsosukesuzuki 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
Sosuke Suzuki 6dd2788e85 Support TypeScript 4.4 (#11426)
* Update to ts-estree 4.30

* Add tests

* Add changelog
2021-08-31 10:29:20 +09: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] 47cfb6beb3 Build(deps): Bump typescript from 4.3.5 to 4.4.2 (#11423) 2021-08-29 09:37:09 +00:00
dependabot[bot]andSosuke Suzuki 493f393ac7 Build(deps): Bump flow-parser from 0.157.0 to 0.158.0 (#11385)
* Build(deps): Bump flow-parser from 0.157.0 to 0.158.0

Bumps [flow-parser](https://github.com/facebook/flow) from 0.157.0 to 0.158.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.157.0...v0.158.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 tests for class fields feature (#11394)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
2021-08-24 13:23:31 +09:00
dependabot[bot]andSosuke 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
Sosuke Suzuki 53f95f3500 Support hack-style pipeline (#11335)
* Avoid to conflicts to v8intrinsic plugin

* Support hack-style pipeline

* Update tests for hask-style pipeline

* Update tests 2

* Add changelog

* Update misc tests

* Address reviews

* Fix type error

* Copy plugin array

* Add tests

* Address review

* Add error tests
2021-08-15 01:16:13 +09:00
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