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

Commit

Permalink
merge, contribution tips and more changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Mar 18, 2023
1 parent 805ce83 commit 5ea8c01
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ indent_size = 2

# YAML doesn't support hard tabs 🙃
# Templates that will be weird with hard tabs in the website editor
[{**.yml, .github/**.md, **.rs, **.mdx}]
[{**.yml, **.md, **.rs, **.mdx}]
indent_style = space

[*.rs]
Expand Down
53 changes: 27 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,21 @@
While this change is a bug fix, this could affect how the `ignore` entries are defined inside a project. We suggest to review them
and make sure they still work.
- `--apply-suggested` is now called `--apply-unsafe`
- `rome check --apply` and `rome check --apply-unsafe` exits with non-zero code (error code)
if there are still diagnostics to be addressed.

##### Other changes

- `rome check` now sorts import statements. This is an experimental feature that needs to be
enabled via configuration.
- Rome now is able to auto discover the configuration file. If Rome doesn't fine a configuration in the
- `rome check` now checks import statements. This is an experimental feature that needs to be
enabled via configuration. Import can be sorted using `rome check --apply-unsafe`
- Rome is able to auto discover the configuration file. If Rome doesn't fine a configuration in the
working directory, it will try to find one in the parent directories.
- Add a new global options called `--config-path`. It tells Rome to try and discover a `rome.json` file
in the given path.
```shell
rome format --config-path=../../other/path/
rome check --config-path=../../other/path/
```
- `rome check --apply` and `rome check --apply-unsafe` exit with an error code if some file
still has error diagnostics. This will happen for rules that don't have code fixes.
-


### Configuration

Expand All @@ -51,11 +49,10 @@ still has error diagnostics. This will happen for rules that don't have code fix

```json
{
"javascript": {
"organizeImports": {
"enabled": true
}
}
"organizeImports": {
"enabled": true,
"ignore": ["trickyFile.js"]
}
}
```
- Add `linter.rules.all` and `linter.rules.[group].all`. These options allow to enable or disable **all**
Expand All @@ -64,14 +61,14 @@ rules, or all rules for a **given group**. `all` and `recommended` can't be both

```json
{
"linter": {
"rules": {
"all": true,
"style" : {
"all": false
}
}
}
"linter": {
"rules": {
"all": true,
"style" : {
"all": false
}
}
}
}
```

Expand All @@ -81,23 +78,27 @@ The previous example will enable all rules and disable all rules that belong to

##### Other changes

- Add support to display diagnostics for JSON files
- Add support to format JSON files
- Pull diagnostics when parsing a `rome.json` file
- Add support to display diagnostics for JSON files.
- Add support to format JSON files.
- Pull diagnostics when parsing a `rome.json` file.
- Import sorting is not applied for files that are not supported or ignored.

### Formatter

- Add support for JSON files
- Add support for TS 4.7
-
- Add support for TypeScript 4.7
- Add support for TypeScript 5.0

### Linter


- New rules are promoted, please check [#4239](https://github.com/rome/tools/pull/4239) for more
details.
-

### Parser

- Support for TypeScript 4.7
- Support for TypeScript 5.0

### VSCode

Expand Down
29 changes: 18 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ If benchmarking the language server, be sure to build with the `--release` flag.
The VS Code extension can be installed from the [Marketplace](https://marketplace.visualstudio.com/items?itemName=rome.rome) and can be used with a development build of the language server by setting the `"rome.lspBin"` VS Code setting to the path of the binary:

```json
"rome.lspBin": "/path/to/rome/target/debug/rome"
{
"rome.lspBin": "/path/to/rome/target/debug/rome"
}
```

Please note that Windows disallows modifying an executable while it's running,
Expand Down Expand Up @@ -147,7 +149,6 @@ pnpm start

## Checks


- `cargo lint` is a cargo alias that runs [`clippy`](https://github.com/rust-lang/rust-clippy) - rust official linter - under the hood;
- `cargo format` is a cargo alias that runs [`rust-fmt`](https://github.com/rust-lang/rustfmt) - rust official formatter - under the hood;
- `cargo test` will run the suite; make sure to run this command from the root of the project, so it will run the tests of all the internal crates;
Expand Down Expand Up @@ -229,24 +230,30 @@ Here's a sample of the headings:
```markdown
## [Unreleased]

### CLI
### Configuration
### Editors
### Formatter
### Linter
### Parser
### VSCode
### JavaScript APIs
## CLI
## Configuration
## Editors
## Formatter
## Linter
## Parser
## VSCode
## JavaScript APIs
```


If you're editing a blank section:
When you're editing a blank section:

- If your PR adds a **breaking change**, create a new heading called `#### BREAKING CHANGES` and add
bullet point that explains the breaking changes; provide a migration path if possible.
- If your PR adds a new feature of a fix, create a new heading called `#### Other changes` and
add a bullet point that explains the fix or the new feature. Make sure that this new heading
appears after the `#### BREAKING CHANGES` heading.

##### Writing a changelog line

- Use the present tense, e.g. "Add new feature", "Fix edge case"
- If you fix a bug, please add the link to the issue, e.g. "Fix edge case [#4444]()"

#### Documentation

If your PR requires some update on the website (new features, breaking changes, etc.), you should create a new PR once the previous PR is successfully merged.
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_service/src/configuration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Default for Configuration {
enabled: true,
..LinterConfiguration::default()
}),
organize_imports: Some(OrganizeImports { enabled: false }),
organize_imports: Some(OrganizeImports::default()),
formatter: None,
javascript: None,
schema: None,
Expand Down

0 comments on commit 5ea8c01

Please sign in to comment.