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

Commit 222968c

Browse files
authored
feat: enable organize imports by default (#4754)
1 parent 7b162d5 commit 222968c

15 files changed

+69
-9
lines changed

crates/rome_cli/tests/configs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub const CONFIG_FORMAT: &str = r#"{
1010

1111
pub const CONFIG_INIT_DEFAULT: &str = r#"{
1212
"organizeImports": {
13-
"enabled": false
13+
"enabled": true
1414
},
1515
"linter": {
1616
"enabled": true,
@@ -24,7 +24,7 @@ pub const CONFIG_INIT_DEFAULT: &str = r#"{
2424
pub const CONFIG_INIT_DEFAULT_WHEN_INSTALLED: &str = r#"{
2525
"$schema": "./node_modules/rome/configuration_schema.json",
2626
"organizeImports": {
27-
"enabled": false
27+
"enabled": true
2828
},
2929
"linter": {
3030
"enabled": true,

crates/rome_cli/tests/snapshots/main_commands_check/deprecated_suppression_comment.snap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ file.js:1:1 suppressions/deprecatedSyntax FIXABLE ━━━━━━━━━
3838
2 2 │ a == b;
3939
4040
41+
```
42+
43+
```block
44+
file.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45+
46+
i Import statements could be sorted:
47+
48+
1 │ - //·rome-ignore·lint(suspicious/noDoubleEquals):·test
49+
1 │ + //·rome-ignore·lint/suspicious/noDoubleEquals:·test
50+
2 2 │ a == b;
51+
52+
4153
```
4254

4355
```block

crates/rome_cli/tests/snapshots/main_commands_check/file_too_large.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ check.js lint ━━━━━━━━━━━━━━━━━━━━━━
2121
× Size of check.js is 1.0 MiB which exceeds configured maximum of 1.0 MiB for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
2222
2323
24+
```
25+
26+
```block
27+
check.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28+
29+
× Size of check.js is 1.0 MiB which exceeds configured maximum of 1.0 MiB for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
30+
31+
2432
```
2533

2634
```block

crates/rome_cli/tests/snapshots/main_commands_check/file_too_large_cli_limit.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ check.js lint ━━━━━━━━━━━━━━━━━━━━━━
2828
× Size of check.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
2929
3030
31+
```
32+
33+
```block
34+
check.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35+
36+
× Size of check.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
37+
38+
3139
```
3240

3341
```block

crates/rome_cli/tests/snapshots/main_commands_check/file_too_large_config_limit.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ check.js lint ━━━━━━━━━━━━━━━━━━━━━━
3838
× Size of check.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
3939
4040
41+
```
42+
43+
```block
44+
check.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45+
46+
× Size of check.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
47+
48+
4149
```
4250

4351
```block

crates/rome_cli/tests/snapshots/main_commands_ci/file_too_large.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ ci.js lint ━━━━━━━━━━━━━━━━━━━━━━━
2121
× Size of ci.js is 1.0 MiB which exceeds configured maximum of 1.0 MiB for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
2222
2323
24+
```
25+
26+
```block
27+
ci.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28+
29+
× Size of ci.js is 1.0 MiB which exceeds configured maximum of 1.0 MiB for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
30+
31+
2432
```
2533

2634
```block

crates/rome_cli/tests/snapshots/main_commands_ci/file_too_large_cli_limit.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ ci.js lint ━━━━━━━━━━━━━━━━━━━━━━━
2828
× Size of ci.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
2929
3030
31+
```
32+
33+
```block
34+
ci.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35+
36+
× Size of ci.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
37+
38+
3139
```
3240

3341
```block

crates/rome_cli/tests/snapshots/main_commands_ci/file_too_large_config_limit.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ ci.js lint ━━━━━━━━━━━━━━━━━━━━━━━
3838
× Size of ci.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
3939
4040
41+
```
42+
43+
```block
44+
ci.js organizeImports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
45+
46+
× Size of ci.js is 27 B which exceeds configured maximum of 16 B for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't.
47+
48+
4149
```
4250

4351
```block

crates/rome_cli/tests/snapshots/main_commands_init/creates_config_file.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ expression: content
77
```json
88
{
99
"organizeImports": {
10-
"enabled": false
10+
"enabled": true
1111
},
1212
"linter": {
1313
"enabled": true,

crates/rome_cli/tests/snapshots/main_commands_init/creates_config_file_when_rome_installed_via_package_manager.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ expression: content
88
{
99
"$schema": "./node_modules/rome/configuration_schema.json",
1010
"organizeImports": {
11-
"enabled": false
11+
"enabled": true
1212
},
1313
"linter": {
1414
"enabled": true,

0 commit comments

Comments
 (0)