feat(core-eslint): add pii-declaration-must-be-complete rule
Adds the `conformance/pii-declaration-must-be-complete` ESLint rule at
warn severity. The rule detects `custom: { pii: { ... } }` blocks in
Payload config files and warns when any of the four required sub-fields
(`category`, `purpose`, `exportable`, `restrictable`) is missing.
Incomplete PII declarations can produce incorrect audit reports —
sub-second editor feedback catches the gap before it reaches
compliance/data-map.yml.
- Rule + 7 RuleTester fixtures (complete passes, each missing field
warns, non-pii custom block is no-op, malformed custom.pii is no-op)
- Registered in plugin.js + base.js at "warn"
- Conformance rule count bumped 7 → 8 in CLAUDE.md +
conformance-quickref.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import usecaseMustBeWired from "./rules/usecase-must-be-wired.js";
|
||||
import componentMustHaveStory from "./rules/component-must-have-story.js";
|
||||
import componentMustHaveTest from "./rules/component-must-have-test.js";
|
||||
import atomicTierImportDirection from "./rules/atomic-tier-import-direction.js";
|
||||
import piiDeclarationMustBeComplete from "./rules/pii-declaration-must-be-complete.js";
|
||||
|
||||
/**
|
||||
* The `@repo/core-eslint` conformance plugin. Aggregates custom rules that
|
||||
@@ -35,6 +36,7 @@ const plugin = {
|
||||
"component-must-have-story": componentMustHaveStory,
|
||||
"component-must-have-test": componentMustHaveTest,
|
||||
"atomic-tier-import-direction": atomicTierImportDirection,
|
||||
"pii-declaration-must-be-complete": piiDeclarationMustBeComplete,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user