lootlog/monorepo / .agents/skills/install-anti-slop
install-anti-slop
VerifiedInstall, configure, update, or upgrade vendored anti-slop Oxlint plugins. Use when adding anti-slop, picking up upstream rules or fixes, or migrating an existing installation while preserving local customizations.
assets/anti-slop/effect/rules/prefer-effect-match.ts
View on GitHubimport { defineRule, type ESTree } from "@oxlint/plugins";
const equalityOperators = new Set(["==", "===", "!=", "!=="]);
export const preferEffectMatchRule = defineRule({
meta: {
type: "problem",
docs: {
description:
"Use Match from Effect for chained literal ternaries over the same value.",
},
messages: {
preferMatch:
"Use Match from Effect instead of a chained literal ternary.",
},
},
createOnce(context) {
const isLiteral = (node: ESTree.Node): boolean =>
node.type === "Literal" ||
(node.type === "TemplateLiteral" && node.expressions.length === 0);
const comparedValue = (node: ESTree.Expression): string | undefined => {
if (
node.type !== "BinaryExpression" ||
!equalityOperators.has(node.operator)
) {
return undefined;
}
if (isLiteral(node.left)) return context.sourceCode.getText(node.right);
if (isLiteral(node.right)) return context.sourceCode.getText(node.left);
return undefined;
};
return {
ConditionalExpression(node) {
if (node.parent?.type === "ConditionalExpression") return;
const value = comparedValue(node.test);
if (value === undefined) return;
let alternate = node.alternate;
let literalChecks = 1;
while (alternate.type === "ConditionalExpression") {
if (comparedValue(alternate.test) !== value) return;
literalChecks += 1;
alternate = alternate.alternate;
}
if (literalChecks > 1) {
context.report({ node, messageId: "preferMatch" });
}
},
};
},
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |