We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ef12b1 + cce4f98 commit 7693128Copy full SHA for 7693128
src/rules/yaml-key-sort.ts
@@ -63,6 +63,10 @@ export default class YamlKeySort extends RuleBuilder<YamlKeySortOptions> {
63
const doc = parseYAML(yamlText);
64
const startingPriorityKeys = getEmptyDocument(doc);
65
66
+ if (doc.contents == null) {
67
+ return text;
68
+ }
69
+
70
let remainingKeys = this.getYAMLKeysSorted(yamlKeys, doc, startingPriorityKeys);
71
72
const sortOrder = options.yamlSortOrderForOtherKeys;
0 commit comments