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

Commit

Permalink
chore: code review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 7, 2022
1 parent 507c81f commit f3879e7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
29 changes: 22 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,46 @@

## 0.6.0

### Formatter

- BREAKING CHANGES: the command `rome format --ci` has been removed, use `rome ci` instead.
- Improved the compatibility with Prettier (check #2403 for more details):
- TypeScript's formatting is now in line with what Prettier does.
- Better formatting of string literals. The formatter now does a lot of cleaning:

#### Improved the compatibility with Prettier (check [#2403](https://github.com/rome/tools/issues/2403) for more details)

- TypeScript's formatting is better in line with what Prettier does.
- Better formatting of string literals.
Removing unnecessary quotes in string literals and quotes from member names.
Correctly choose the correct quote based on quantity of quotes inside a literal:
```js
// original code
let a = {
"something": 3
}
let b = "cool isn\'t it";
let c = "\"content\" ' ";

// formatted code
let a = {
something: 3
}
let b = "cool ins't it";
let b = "cool ins't it";
let c = '"content" \' ';
```
- Better formatting of various statements
- Improved the performance of the formatter an average of 20%! Check the relevant
- Better formatting of various statements
- Improved the performance of the formatter an average of 20%-30%! Check the relevant
PRs [1](https://github.com/rome/tools/pull/2456), [2](https://github.com/rome/tools/pull/2638), [3](https://github.com/rome/tools/pull/2612), [4](https://github.com/rome/tools/pull/2462), [5](https://github.com/rome/tools/pull/2634) if you're interested in what the team did.

To reach better compatibility with Prettier, the team had to revise the foundation of our printer,
which caused some regressions around how comments are printed. These are known issues that we
plan to close by next release.

### Linter

We've built the foundation of our linter. At the moment is only opt-in, and it contains
only a bunch of rules. **Safe fixes are not enabled yet via CLI**.

Refer to the [website](https://rome.tools/#linter) to learn how to start using it.

## 0.5.0

- BREAKING CHANGES: the `format` command doesn't write on disk by default. Now the command prints on terminal.
Expand Down
2 changes: 1 addition & 1 deletion website/src/_includes/docs/formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Our formatter is really strict and has support for only a few options:
- quantity of spaces, applied only if you choose spaces as indent style;
- line width, which is the number of characters that fit in a single line; **Rome's default is `80`**

### VSCode extension
### Use the formatter via VSCode extension

The extension allows you to change the default [formatter options](#formatter-options).

Expand Down
6 changes: 5 additions & 1 deletion website/src/_includes/docs/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ You can use the linter via our [VS Code extension] or by downloading our CLI dir
> This is a temporary choice to allow people to play with our formatter. This will change in the near future.

> WARNING: this command is experimental for the time being won't do anything
### Use the formatter via VSCode extension

The feature is opt-in, and you'd need to enable the following options:
- `analysis.enableDiagnostics`
- `analysis.enableCodeActions`

### Use the formatter via CLI

Expand Down

0 comments on commit f3879e7

Please sign in to comment.