Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
allowLineSeparatedGroups
option to the yml/sort-keys
ru…
…le (#247) * feat: add `allowLineSeparatedGroups` option to the `yml/sort-keys` rule * Create rotten-singers-run.md * fix
- Loading branch information
Showing
9 changed files
with
127 additions
and
26 deletions.
There are no files selected for viewing
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 @@ | ||
--- | ||
"eslint-plugin-yml": minor | ||
--- | ||
|
||
feat: add `allowLineSeparatedGroups` option to the `yml/sort-keys` rule |
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
8 changes: 8 additions & 0 deletions
8
tests/fixtures/rules/sort-keys/invalid/allowLineSeparatedGroups/_config.json
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,8 @@ | ||
{ | ||
"options": ["asc", { "allowLineSeparatedGroups": true }], | ||
"settings": { | ||
"yml": { | ||
"indent": 8 | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
tests/fixtures/rules/sort-keys/invalid/allowLineSeparatedGroups/separated-errors.json
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,7 @@ | ||
[ | ||
{ | ||
"message": "Expected mapping keys to be in ascending order. 'a' should be before 'b'.", | ||
"line": 6, | ||
"column": 1 | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
tests/fixtures/rules/sort-keys/invalid/allowLineSeparatedGroups/separated-input.yaml
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 @@ | ||
x: 1 | ||
y: 2 | ||
|
||
b: 3 | ||
a: 4 |
6 changes: 6 additions & 0 deletions
6
tests/fixtures/rules/sort-keys/invalid/allowLineSeparatedGroups/separated-output.yml
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,6 @@ | ||
# sort-keys/invalid/allowLineSeparatedGroups/separated-input.yaml | ||
x: 1 | ||
y: 2 | ||
|
||
a: 4 | ||
b: 3 |
8 changes: 8 additions & 0 deletions
8
tests/fixtures/rules/sort-keys/valid/allowLineSeparatedGroups/_config.json
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,8 @@ | ||
{ | ||
"options": ["asc", { "allowLineSeparatedGroups": true }], | ||
"settings": { | ||
"yml": { | ||
"indent": 8 | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
tests/fixtures/rules/sort-keys/valid/allowLineSeparatedGroups/separated-input.yaml
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 @@ | ||
x: 1 | ||
y: 2 | ||
|
||
a: 3 | ||
b: 4 |