@heyramzi/lint 2.4.4 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/slop.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  import { phrases, words } from "#lint/data/slop-words.js";
50
50
  import { artifacts } from "#lint/data/slop/artifacts.js";
51
51
  import { patterns } from "#lint/data/slop/patterns.js";
52
- import { auditRegister } from "#lint/register.js";
52
+ import { REGISTERS, auditRegister } from "#lint/register.js";
53
53
  import {
54
54
  FAQ_TITLE,
55
55
  copyStrings,
@@ -548,8 +548,10 @@ export function slopGate(
548
548
  const registerAudit = register ? auditRegister(cleaned.text, register) : null;
549
549
  // A Short also owes a hook from the library and a counted, reply-ending skeleton.
550
550
  const shortsAudit = register === "shorts" ? auditShorts(cleaned.text) : null;
551
+ // A register may count only some exact kinds: on Reddit the rest refused most human replies.
552
+ const exact = REGISTERS[register]?.exact;
551
553
  const findings = [
552
- ...audit.findings,
554
+ ...(exact ? audit.findings.filter((f) => exact.includes(f.kind)) : audit.findings),
553
555
  ...(registerAudit?.findings ?? []),
554
556
  ...(shortsAudit?.findings ?? []),
555
557
  ];