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.
1 parent 1877e2b commit 8fecd57Copy full SHA for 8fecd57
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