This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rome_js_parser): EcmaScript @decorators #4252
- Loading branch information
1 parent
716ba53
commit d528ffc
Showing
4 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
crates/rome_js_formatter/tests/specs/prettier/js/decorator-auto-accessors/comments.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
source: crates/rome_formatter_test/src/snapshot_builder.rs | ||
info: js/decorator-auto-accessors/comments.js | ||
--- | ||
|
||
# Input | ||
|
||
```js | ||
class A { | ||
@dec() | ||
// comment | ||
accessor b; | ||
} | ||
|
||
``` | ||
|
||
|
||
# Prettier differences | ||
|
||
```diff | ||
--- Prettier | ||
+++ Rome | ||
@@ -1,5 +1,4 @@ | ||
class A { | ||
- @dec() | ||
- // comment | ||
+ @dec() // comment | ||
accessor b; | ||
} | ||
``` | ||
|
||
# Output | ||
|
||
```js | ||
class A { | ||
@dec() // comment | ||
accessor b; | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters