Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix(rome_js_formatter): Space after type for import equals declarat…
Browse files Browse the repository at this point in the history
…ion (#2391)

Insert a space after the `type` keyword for import equals declarations.
  • Loading branch information
MichaReiser committed Apr 12, 2022
1 parent 316fbfc commit be2114f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ impl ToFormatElement for TsImportEqualsDeclaration {
import_token.format(formatter)?,
space_token(),
type_token.format_with_or_empty(formatter, |token| format_elements![
token,
space_token(),
token
])?,
id.format(formatter)?,
space_token(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
source: crates/rome_js_formatter/tests/prettier_tests.rs
assertion_line: 119
expression: type-imports.ts

---
# Input
```js
Expand All @@ -29,16 +27,16 @@ b = require("b");

# Output
```js
import typeA = require("foo");
import type A = require("foo");
export import type = require("A");
import typeA = require("A");
import type A = require("A");
import typea = require("a");
import type a = require("a");
export import typeB = require("B");
export import type B = require("B");
export import typeb = require("b");
export import type b = require("b");
```

Expand Down

0 comments on commit be2114f

Please sign in to comment.