-
-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(editorconfig): remove support for
max_line_length
(#4894)
- Loading branch information
Showing
12 changed files
with
245 additions
and
87 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
..._line_length_from_editorconfig_as_it_isnt_part_of_the_official_spec_anymore_.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
cli: major | ||
--- | ||
|
||
# Remove support for `max_line_length` from `.editorconfig`, as it isn't part of the official spec anymore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 33 additions & 3 deletions
36
...me_cli/tests/snapshots/main_cases_editorconfig/should_have_cli_override_editorconfig.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,55 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
expression: redactor(content) | ||
snapshot_kind: text | ||
--- | ||
## `.editorconfig` | ||
|
||
```editorconfig | ||
[*] | ||
max_line_length = 90 | ||
indent_style = space | ||
indent_size = 8 | ||
``` | ||
|
||
## `test.js` | ||
|
||
```js | ||
console.log("really long string that should break if the line width is <=90, but not at 100"); | ||
function setName(name) { | ||
currentName = name; | ||
} | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks. | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
test.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Formatter would have printed the following content: | ||
1 1 │ function setName(name) { | ||
2 │ - ·currentName·=·name; | ||
2 │ + ····currentName·=·name; | ||
3 3 │ } | ||
4 4 │ | ||
``` | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes applied. | ||
Found 1 error. | ||
``` |
12 changes: 8 additions & 4 deletions
12
crates/biome_cli/tests/snapshots/main_cases_editorconfig/should_use_editorconfig.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
expression: redactor(content) | ||
snapshot_kind: text | ||
--- | ||
## `.editorconfig` | ||
|
||
```editorconfig | ||
[*] | ||
max_line_length = 300 | ||
indent_style = space | ||
indent_size = 8 | ||
``` | ||
|
||
## `test.js` | ||
|
||
```js | ||
console.log("really long string that should cause a break if the line width remains at the default 80 characters"); | ||
function setName(name) { | ||
currentName = name; | ||
} | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Formatted 1 file in <TIME>. No fixes applied. | ||
Formatted 1 file in <TIME>. Fixed 1 file. | ||
``` |
Oops, something went wrong.