Files
test-repo/changelog_unreleased/javascript/pr-8312.md
T
Georgii Dolzhykov d420202df4 fix(js): comments after superclass (#8312)
* Fix comments after superclass

* add changelog

* refactor

* Organize tests

* Use addBlockStatementFirstComment

* Amend unstableTests list

* Avoid identical comments in tests

* Add tests for `implements`

* Handle comments in interfaces

* Remove an always-false condition

* Almost a fix

* Further fixes

* Add DeclareClass

* Add DeclareInterface, mixins

* Fix extends in DeclareClass

* Fix DeclareClass

* Fix mixins

* Refactor: remove unused parameters

* Add marked dangling comments

* Unify printing of interface for TS and Flow

* Fix unstable interfaces

* Remove comment

* Restore the original behavior for interfaces with multiple inheritance

* Refactoring, tests

* Remove unused code

* Include a file accidentally omitted from the merge commit

* Remove unused type import
2020-05-24 21:53:29 +03:00

414 B

Fix comments in the extends part of class declarations/expressions (#8312 by @thorn0)

// Input
class a extends a // comment
{
  constructor() {}
}

// Prettier stable
class a extends a // comment {
  constructor() {}
}

// Prettier master
class a extends a { // comment
  constructor() {}
}