Skip to content
SprecherEast
Issue 253

tech-debt: Lint that every Payload Local API call sets overrideAccess

Back to our plan
Open
cmstoolingtech-debtpriority: low

Type

tech-debt

Summary

Add a lint check that every Payload Local API call (find, findByID, findGlobal, create, update, delete, count) sets overrideAccess explicitly.

Problem

docs/project.md says every Local API call must set overrideAccess (false for what a visitor may see, true only with a comment saying why). Today only reviews enforce it. docs/architecture/README.md said #137 would add a lint check, but that was outside #137's scope, so #252 removed the line instead.

Proposed fix

  • An ESLint no-restricted-syntax selector (or a small local rule) that flags a call on payload whose options object has no overrideAccess property.
  • Exclude src/endpoints/seed/ until #251 adds the flag there.
  • Document it in docs/architecture/README.md.

Acceptance criteria

  • Not done: A Local API call without overrideAccess fails npx eslint ..
  • Not done: Every existing call passes (seed excluded until #251).
  • Not done: A test or a throwaway-file check shows the rule fires.

Area

tooling, cms

Priority

low


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab