{"id":"@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields","slug":"tools.eslint-plugin-no-implicit-sensitivefields","name":"@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields","version":"2.0.4","path":"packages/tools/eslint-plugin-no-implicit-sensitivefields","manifestPath":"packages/tools/eslint-plugin-no-implicit-sensitivefields/package.json","manifestBlobSha":"9e78c3cd3f3f0c34508d2abd2c73ca28dd9d35c5","layer":"tools","physicalArea":null,"primaryArea":"tooling-and-agent-delivery","classification":{"privateDeclared":null,"catalogFamily":"sharedLibs","catalogKind":"tool","catalogStatus":"active","adoptionMode":"operator-only","stability":"experimental"},"description":"ESLint rule enforcing that every defineReferenceKind() call declares an explicit sensitiveFields array (closes F-4).","descriptionOrigin":"package.json","catalog":{"family":"sharedLibs","kind":"tool","status":"active","adoptionMode":"operator-only","stability":"experimental","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./rule"],"documentation":[{"title":"Tools Eslint Plugin No Implicit Sensitivefields documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Ftools.eslint-plugin-no-implicit-sensitivefields","kind":"readme"}],"examples":[],"replacements":[],"nonAdoptableRationale":"This tool is published for execution by operators, not as a reusable library dependency."},"canonicalImports":[],"scripts":{"build":"contractspec-bun-build build","build:bundle":"contractspec-bun-build transpile","build:types":"contractspec-bun-build types","clean":"rimraf dist .turbo","lint":"bun run lint:fix","lint:fix":"node ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .","lint:check":"node ../../../scripts/biome.cjs check .","test":"bun test","typecheck":"tsgo --noEmit","prebuild":"contractspec-bun-build prebuild"},"scriptStatus":"complete pinned manifest","dependencies":{},"devDependencies":{"@lssm-tech/tool.bun":"workspace:*","@lssm-tech/tool.typescript":"workspace:*","@types/estree":"^1.0.9","eslint":"^10.10.0","typescript":"catalog:"},"peerDependencies":{"eslint":">=10.10.0"},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./rule":"./src/rule.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","browser":"./dist/browser/index.js","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./rule":{"types":"./dist/rule.d.ts","browser":"./dist/browser/rule.js","bun":"./dist/rule.js","node":"./dist/node/rule.js","default":"./dist/rule.js"}},"types":"./dist/index.d.ts","files":["dist","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/tools/eslint-plugin-no-implicit-sensitivefields/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./rule","importPath":"@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields/rule","target":"./src/rule.ts","targets":[{"conditions":[],"target":"./src/rule.ts","sourcePath":"packages/tools/eslint-plugin-no-implicit-sensitivefields/src/rule.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields/src/rule.ts","sourceStatus":"verified source file"}]}],"entryCount":2,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Tools Eslint Plugin No Implicit Sensitivefields documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Ftools.eslint-plugin-no-implicit-sensitivefields","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/tools.eslint-plugin-no-implicit-sensitivefields.txt"},"readme":{"status":"available","body":"# @lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields\n\nESLint plugin that enforces explicit `sensitiveFields` declarations on every `defineReferenceKind()` call from `@lssm-tech/lib.contracts-spec/rich-reference`.\n\nCloses plan slice S-1b (architect NR-2 / F-4 mitigation): the contracts-spec runtime already throws when `sensitiveFields` is missing or non-array, but the runtime cannot enforce the additional repository policy that an empty array (`sensitiveFields: []`) must be accompanied by an inline confirmation comment. This rule catches both issues at lint time.\n\n## Install\n\n```bash\nbun add -d @lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields\n```\n\n`eslint` (>=8, <11) is a peer dependency.\n\n## Flat config (ESLint 9+)\n\n```js\nimport noImplicitSensitiveFields from '@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields';\n\nexport default [\n  {\n    plugins: { 'no-implicit-sensitivefields': noImplicitSensitiveFields },\n    rules: { 'no-implicit-sensitivefields/no-implicit-sensitivefields': 'error' },\n  },\n];\n```\n\nOr apply the bundled `recommended` flat config in one line:\n\n```js\nimport { configs } from '@lssm-tech/tools.eslint-plugin-no-implicit-sensitivefields';\n\nexport default [configs.recommended];\n```\n\n## What the rule does\n\nFor every call expression whose callee is `defineReferenceKind` (or `<obj>.defineReferenceKind`):\n\n1. If the object literal argument lacks a `sensitiveFields` property → reports `missing`.\n2. If `sensitiveFields: []` appears without a nearby comment containing `confirmed: no sensitive fields` → reports `emptyWithoutComment`.\n\nA \"nearby\" comment is one whose line number is within ±1 line of the `sensitiveFields` property — covering the common authoring shapes: a leading comment, a same-line trailing comment, or an in-block comment immediately after.\n\n### Valid\n\n```ts\ndefineReferenceKind({\n  id: 'ticket',\n  schema,\n  sensitiveFields: ['title'],\n  defaultPreview: 'inline-card',\n  defaultPanel: 'drawer',\n  icon: 'ticket',\n});\n\ndefineReferenceKind({\n  id: 'public-doc',\n  schema,\n  // confirmed: no sensitive fields\n  sensitiveFields: [],\n  defaultPreview: 'inline-card',\n  defaultPanel: 'drawer',\n  icon: 'doc',\n});\n\ndefineReferenceKind({\n  id: 'public-doc-2',\n  schema,\n  sensitiveFields: [], // confirmed: no sensitive fields\n  defaultPreview: 'inline-card',\n  defaultPanel: 'drawer',\n  icon: 'doc',\n});\n```\n\n### Invalid\n\n```ts\n// Missing sensitiveFields entirely\ndefineReferenceKind({\n  id: 'bad-1',\n  schema,\n  defaultPreview: 'inline-card',\n  defaultPanel: 'drawer',\n  icon: 'bad',\n}); // error: missing\n\n// Empty list without the confirmation marker\ndefineReferenceKind({\n  id: 'bad-2',\n  schema,\n  sensitiveFields: [],\n  defaultPreview: 'inline-card',\n  defaultPanel: 'drawer',\n  icon: 'bad',\n}); // error: emptyWithoutComment\n```\n\n## Test\n\n```bash\nbun test\n```\n","sourcePath":"packages/tools/eslint-plugin-no-implicit-sensitivefields/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/eslint-plugin-no-implicit-sensitivefields/README.md","blobSha":"8c4048cc6c61b7393c2d05c83263833ed144cba4","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"tooling-and-agent-delivery","areaTitle":"CLI, authoring and agent tooling","displayName":"tools.eslint-plugin-no-implicit-sensitivefields","runtimes":["node"],"platforms":["server"],"kind":"tool","scope":"Package manifest","canonicalRoute":"/docs/packages/tools.eslint-plugin-no-implicit-sensitivefields/","contextUrl":"/docs/packages/tools.eslint-plugin-no-implicit-sensitivefields.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}