Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1331d61
release: placeholder
ematipico Dec 7, 2022
05adcfa
chore: update documentation
ematipico Mar 5, 2023
face399
some goodies for the README.md
ematipico Mar 6, 2023
7967014
chore: make organize imports opt-in only
ematipico Mar 6, 2023
4baa586
add examples to help
ematipico Mar 8, 2023
667974b
feat(rome_service): add `all` configuration to linter (#4258)
ematipico Mar 5, 2023
d819a12
docs(rome_js_analyze): improve noDuplicateParameters docs (#4257)
Conaclos Mar 5, 2023
dcf1dde
docs(rome_js_analyze): improve noCatchAssign docs (#4262)
Conaclos Mar 5, 2023
7d6c6ee
Fix Linux executable's path in the standalone docs (#4251)
davidbgk Mar 5, 2023
fd0ea23
fix(rome_fs): Allow to ignore patterns to symbolic links (symlinks) (…
realtimetodie Mar 5, 2023
cb49a39
fix(rome_cli): don't add newline when formatting from std (#4263)
ematipico Mar 6, 2023
6451441
feat(rome_js_analyzer): read globals from analyzer options (#4261)
ematipico Mar 6, 2023
19e461d
feat(rome_js_analyze): noParameterAssign (#4264)
Conaclos Mar 7, 2023
622f130
docs(rome_js_analyze): `noParameterAssign` in release 12.0.0 (#4271)
Conaclos Mar 7, 2023
e1c41c9
feat(rome_js_parser): Support optional variance annotation (#4250)
nissy-dev Mar 8, 2023
727bb1e
feat(rome_js_analyze): useNamespaceKeyword (#4266)
Conaclos Mar 8, 2023
ff06665
chore: update dependencies (#4277)
ematipico Mar 8, 2023
6d60763
docs(rome_js_analyze): improve CONTRIBUTING and code gen (#4278)
Conaclos Mar 8, 2023
b5a2fd4
refactor(rome_js_analyze): rename noSelfAssignment to noSelfAssign (#…
Conaclos Mar 8, 2023
7b4ad15
docs(rome_js_analyze): improve CONTRIBUTING (#4280)
Conaclos Mar 8, 2023
4c3775b
fix(rome_cli): prevent exploration of ignored directories (#4276)
ematipico Mar 9, 2023
d7d94e8
docs: Changing the yarn command (#4273)
JunkMeal Mar 9, 2023
43f9a03
refactor(rome_js_analyze): noDelete (#4272)
Conaclos Mar 9, 2023
8b25653
fix(rome_cli): exit with error code while applying fixes (#4270)
ematipico Mar 10, 2023
def3db2
update changelog
ematipico Mar 10, 2023
2724c43
rebase and add mention for testing
ematipico Mar 10, 2023
3bf7555
more changelog changes
ematipico Mar 10, 2023
689140a
Merge remote-tracking branch 'origin/main' into release/12.0.0
ematipico Mar 10, 2023
cf04739
merge
ematipico Mar 10, 2023
5c9b1f0
apply format
ematipico Mar 10, 2023
21a808f
more changes
ematipico Mar 11, 2023
4efff74
chore: apply organize imports
ematipico Mar 15, 2023
805ce83
Merge remote-tracking branch 'origin/main' into release/12.0.0
ematipico Mar 18, 2023
5534335
merge, contribution tips and more changelog
ematipico Mar 18, 2023
ca8e902
add script
ematipico Mar 18, 2023
7527be7
update configuration
ematipico Mar 18, 2023
9437ab1
fix generation of json blocks
ematipico Mar 18, 2023
fdf5f96
apply check
ematipico Mar 18, 2023
6a29f2d
change versioning philosophy
ematipico Mar 20, 2023
2537dcd
update rage command to take organize imports into account
ematipico Mar 20, 2023
dcd4340
list of rules
ematipico Mar 21, 2023
e95384c
bump numbers
ematipico Mar 21, 2023
d2e1c31
udpate contributors
ematipico Mar 27, 2023
34a66e7
Merge remote-tracking branch 'origin' into release/12.0.0
ematipico Mar 27, 2023
03942c9
better phrase
ematipico Mar 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: make organize imports opt-in only
  • Loading branch information
ematipico committed Mar 6, 2023
commit 7967014868ae0c49ab005ce571963111a77dda83
4 changes: 4 additions & 0 deletions crates/rome_cli/tests/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,10 @@ fn organize_imports() {
let mut fs = MemoryFileSystem::default();
let mut console = BufferConsole::default();

let config = r#"{ "organizeImports": { "enabled": true } }"#;
let file_path = Path::new("rome.json");
fs.insert(file_path.into(), config.as_bytes());

let file_path = Path::new("check.js");
let content = r#"
import { lorem, foom, bar } from "foo";
Expand Down
4 changes: 2 additions & 2 deletions crates/rome_cli/tests/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub const CONFIG_FORMAT: &str = r#"{

pub const CONFIG_INIT_DEFAULT: &str = r#"{
"organizeImports": {
"enabled": true
"enabled": false
},
"linter": {
"enabled": true,
Expand All @@ -24,7 +24,7 @@ pub const CONFIG_INIT_DEFAULT: &str = r#"{
pub const CONFIG_INIT_DEFAULT_WHEN_INSTALLED: &str = r#"{
"$schema": "./node_modules/rome/configuration_schema.json",
"organizeImports": {
"enabled": true
"enabled": false
},
"linter": {
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
source: crates/rome_cli/tests/snap_test.rs
expression: content
---
## `rome.json`

```json
{ "organizeImports": { "enabled": true } }
```

## `check.js`

```js
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ expression: content
```json
{
"organizeImports": {
"enabled": true
"enabled": false
},
"linter": {
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ expression: content
{
"$schema": "./node_modules/rome/configuration_schema.json",
"organizeImports": {
"enabled": true
"enabled": false
},
"linter": {
"enabled": true,
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: true }),
organize_imports: Some(OrganizeImports { enabled: false }),
formatter: None,
javascript: None,
schema: None,
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ How many characters can be written on a single line.

## `organizeImports`

### `organizeImports.enabled`
### `organizeImports.enabled` (experimental)

Enables Rome's sort imports.

> Default: `true`
> Default: `false`

## `javascript`

Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/guides/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Install our official [Rome VS Code extension](https://marketplace.visualstudio.c

To make Rome the default formatter open a supported file (JavaScript or TypeScript) and:

* open the *Command Palette* (View or Command/Ctrl + Shift + P)
* open the *Command Palette* (View or <kbd>Ctrl</kbd>/<kbd title="Cmd">⌘</kbd>+<kbd title="Shift">⇧</kbd>+<kbd>P</kbd>)
* select *Format Document With...*
* select *Configure Default Formatter*
* select *Rome*.
Expand Down