persona-community-5/.pnpm-store/v3/files/cc/df6e0739fefa606000878655d37ee9e7d3bb12efb716cb966bf5600adf1f80f0a6d26af44312e1602017c417bfdcca627f263d0198bd89a175232450aa6be3
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

24 lines
839 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TagsAlphabetical = void 0;
const TagsAlphabetical = ({ ignoreCase = false }) => {
return {
Root(root, { report, location }) {
if (!root.tags)
return;
for (let i = 0; i < root.tags.length - 1; i++) {
if (getTagName(root.tags[i], ignoreCase) > getTagName(root.tags[i + 1], ignoreCase)) {
report({
message: 'The `tags` array should be in alphabetical order.',
location: location.child(['tags', i]),
});
}
}
},
};
};
exports.TagsAlphabetical = TagsAlphabetical;
function getTagName(tag, ignoreCase) {
return ignoreCase ? tag.name.toLowerCase() : tag.name;
}