release: 0.6.0
MODIFY
CHANGELOG.md
CHANGELOG.md
# Rome changelog
+## 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](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 c = '"content" \' ';
+ ```
+- 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.

MODIFY
crates/rome_analyze/src/analyzers/no_double_equals.rs
crates/rome_analyze/src/analyzers/no_double_equals.rs
@@ -34,7 +34,7 @@ impl Rule for NoDoubleEquals {
fn diagnostic(_: &Self::Query, op: &Self::State) -> Option<RuleDiagnostic> {
Some(RuleDiagnostic {
- severity: Severity::Error,
+ severity: Severity::Warning,
message: markup! {
"Do not use the "{op.text_trimmed()}" operator"
}

MODIFY
crates/rome_analyze/src/analyzers/use_while.rs
crates/rome_analyze/src/analyzers/use_while.rs
@@ -46,7 +46,7 @@ impl Rule for UseWhile {
fn diagnostic(node: &Self::Query, _: &Self::State) -> Option<RuleDiagnostic> {
Some(RuleDiagnostic {
- severity: Severity::Error,
+ severity: Severity::Warning,
message: markup! {
"Use a while loop instead of a for loop"
}

MODIFY
crates/rome_cli/tests/main.rs
crates/rome_cli/tests/main.rs
@@ -55,6 +55,7 @@ mod check {
}
#[test]
+ #[ignore = "lint errors are disabled until the linter is stable"]
fn lint_error() {
let mut fs = MemoryFileSystem::default();

MODIFY
editors/vscode/package-lock.json
editors/vscode/package-lock.json
{
"name": "rome",
- "version": "0.6.0",
+ "version": "0.8.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "rome",
- "version": "0.6.0",
+ "version": "0.8.0",
"license": "MIT",
"dependencies": {
"vscode-languageclient": "^8.0.0-next.13"

MODIFY
editors/vscode/package.json
editors/vscode/package.json
"publisher": "rome",
"displayName": "Rome",
"description": "Rome LSP VS Code Extension",
- "version": "0.6.0",
+ "version": "0.8.0",
"icon": "icon.png",
"activationEvents": [
"onLanguage:javascript",

MODIFY
npm/rome/package.json
npm/rome/package.json
{
"name": "rome",
- "version": "0.5.0-next",
+ "version": "0.6.0-next",
"bin": "bin/rome",
"scripts": {
"postinstall": "node scripts/postinstall.js"

ADD
website/src/_includes/docs/ci.md
+## CI
+
+Rome comes with a CI mode that allows performing multiple CI checks just by
+running one single command.
+
+This mode is only available via CLI.
+
+### Use CI mode via CLI
+
+```shell
+rome ci
+```
+
+This command will:
+- run the formatter in check mode
\ No newline at end of file

MODIFY
website/src/_includes/docs/formatter.md
website/src/_includes/docs/formatter.md
@@ -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).
@@ -35,8 +35,6 @@ appear only for documents that Rome supports.
### Use the formatter with the CLI
-The only command that is supported is `format`.
-
You can start by running the CLI with the `--help` flag:
```shell
@@ -55,7 +53,6 @@ USAGE:
OPTIONS:
--write Write the output of the formatter to the files instead of printing the diff to the console
- --ci Enable CI mode, lock files and exit with an error if the formatter would modify them
--skip-errors Skip over files containing syntax errors instead of returning an error
--indent-style <tabs|space> Determine whether the formatter should use tabs or spaces for indentation (default: tabs)
--indent-size <number> If the indentation style is set to spaces, determine how many spaces should be used for indentation (default: 2)

ADD
website/src/_includes/docs/linter.md
+## Linter
+
+You can use the linter via our [VS Code extension] or by downloading our CLI directly from our [release page].
+
+> WARNING: The CLI and VS Code extension are packaged with separate binaries, which means that if you don't
+> use our default options, you will have to **pass them to both the extension AND the CLI**.
+>
+> This is a temporary choice to allow people to play with our formatter. This will change in the near future.
+
+
+### 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
+
+You can start by running the CLI with the `--help` flag:
+
+```shell
+rome check --help
+```
+
+Which will show you the options available at the moment:
+
+```shell
+USAGE:
+ rome check <INPUTS...>
+
+ INPUTS can be one or more filesystem path, each pointing to a single file or an entire directory to be searched recursively for supported files
+
+```
+
+
+[VS Code extension]: https://marketplace.visualstudio.com/items?itemName=rome.rome
+[release page]: https://github.com/rome/tools/releases

MODIFY
website/src/index.md
website/src/index.md
@@ -8,5 +8,7 @@ layout: layouts/homepage.liquid
{% include docs/getting-started.md %}
{% include docs/status.md %}
{% include docs/formatter.md %}
+{% include docs/linter.md %}
+{% include docs/ci.md %}
{% include docs/philosophy.md %}
{% include docs/_old_diagnostic-anatomy.md %}

release: 0.6.0 (#2662)

Co-authored-by: Yasser Elassal <yassere@gmail.com>
Co-authored-by: strager <strager.nds@gmail.com>
Co-authored-by: Micha Reiser <micha@rome.tools>
Co-authored-by: l3ops <leo@rome.tools>