Skip to content

refactor(member): drop the no-unknown-parameters directive on ClassifyMember - #96

Merged
Upd4ting merged 1 commit into
mainfrom
refactor/classify-member-type-guard-parser
Nov 14, 2026
Merged

Upd4ting merged 1 commit into
mainfrom
refactor/classify-member-type-guard-parser

Conversation

@Upd4ting

@Upd4ting Upd4ting commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Why

Antony wants every suppression guardrails.suppressions.json allows in this repo brought to zero by fixing what it hides, so the lint holds without escape hatches (ANT-1090). The last one was the anti-slop/no-unknown-parameters directive on ClassifyMember, a hand-written parser that takes any caller value and returns a Member. tooling-configs 0.6.0 (#328, ANT-2363) changed the rule to accept a function that reads its unknown parameter only through type guards and returns a declared type. This PR adopts tooling-configs 0.7.0, drops the directive, and lowers the rule's ceiling to 0. Every count in the budget file is now 0.

What

  • @antelopejs/tooling-configs goes from ^0.5.8 to >=0.7.0 <0.8.0.
  • src/implementations/database/member.ts loses its oxlint-disable-next-line anti-slop/no-unknown-parameters line. ClassifyMember is unchanged.
  • guardrails.suppressions.json lowers anti-slop/no-unknown-parameters from 1 to 0, via pnpm run suppressions:update.
  • What 0.6.0 and 0.7.0 add or tighten, fixed here:
    • The dependency:ranges step (0.6.0 #336) refuses an AntelopeJS range open past the next minor. @antelopejs/interface-core goes from >=0.1.1 <1.0.0 to >=0.5.0 <0.6.0 (newest is 0.5.1), and @antelopejs/core from ^1.21.0 to ~1.23.1. antelopejs-sync regenerated the README compatibility table to match.
    • The readme:version step (0.6.0 #343) refuses a README config example whose range does not admit package.json's version. The example's ^0.2.0 becomes >=0.4.0 <0.5.0.
    • 0.7.0 removed the antelopejs-check-interface-ranges bin, because antelopejs-checks runs dependency:ranges itself. The lint script is now plain oxlint, and AGENTS.md names the step that enforces the caps.
    • The published:types step (0.7.0 #355) typechecks the published declarations as a consumer installs them. It passes with no change.
    • antelopejs-sync regenerated the managed table in AGENTS.md (it adds antelopejs/no-unrun-query).
flowchart LR
  value["caller value (unknown)"] --> guards["instanceof / Array.isArray / IsString / IsNumber / IsBoolean / IsPlainObject"]
  guards --> member["Member (declared return type)"]
  rule["no-unknown-parameters (tooling-configs 0.7.0)"] -. accepts: read only through guards, typed return .-> guards
Loading

SAFETY comments added

None.

Proof

ClassifyMember with the directive removed, linted by each preset:

# before: @antelopejs/tooling-configs 0.5.8 (origin/main)
src/implementations/database/member.ts:124:39: error anti-slop(no-unknown-parameters): Parameter `value` leaves input unparsed. Accept a named domain type and run the expected schema or parser at the I/O boundary before calling this function, or make this function that parser: pass the parameter only to the schema and return its result under a declared type.

# after: @antelopejs/tooling-configs 0.7.0
(no diagnostics, exit 0)

pnpm run checks with 0.7.0, before the range fixes:

[dependency:ranges]
package.json: dependencies["@antelopejs/interface-core"] is ">=0.1.1 <1.0.0": AntelopeJS packages ship breaking changes in minor releases, so it must stop below the next minor; use ">=0.1.1 <0.2.0"
package.json: devDependencies["@antelopejs/core"] is "^1.21.0": AntelopeJS packages ship breaking changes in minor releases, so it must stop below the next minor; use "~1.21.0"

[readme:version]
README.md:54 gives @antelopejs/postgres the version range "^0.2.0", which does not admit 0.4.0, the version in package.json. Set a range that admits it.
Checks: 11 passed, 2 failed.

After:

Checks: 13 passed, 0 failed.

API: 1 packages, 1 entries unchanged against origin/main (committed HEAD).
API: skipped .agents/skills/verify-module, not a workspace package.
Runtime API: 1 packages, 1 entries unchanged against origin/main (committed HEAD).
No behavioural probe ran.

Suppressions in authored code files (origin/main and committed HEAD). A lint directive counts once per rule it names; * is a directive naming none.

Suppressions base HEAD
Lint suppressions, all rules 1 0
Lint suppressions, anti-slop/no-unknown-parameters 1 0
@ts-expect-error 0 0
@ts-ignore 0 0
SAFETY: comments 0 0
Lint config rule-offs, all rules 0 0

@Upd4ting Upd4ting added the tgz-pending Pins a dependency to a tarball until its release label Nov 13, 2026
…yMember

Adopt @antelopejs/tooling-configs 0.7.0, whose no-unknown-parameters accepts a parser that reads its unknown parameter only through type guards, and lower the rule's ceiling to 0. Cap @antelopejs/interface-core and @antelopejs/core below their next minor, as the dependency:ranges step of 0.7.0 requires, and replace the removed antelopejs-check-interface-ranges bin in the lint script.
@Upd4ting
Upd4ting force-pushed the refactor/classify-member-type-guard-parser branch from 27a9d9c to 7ebc1b9 Compare November 14, 2026 03:24
@Upd4ting Upd4ting removed the tgz-pending Pins a dependency to a tarball until its release label Nov 14, 2026
@Upd4ting
Upd4ting merged commit e4b91bb into main Nov 14, 2026
35 of 40 checks passed
@Upd4ting
Upd4ting deleted the refactor/classify-member-type-guard-parser branch November 14, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant