# core/plugins/manifest.metric.plugin.ts

> 13 lines of code and 4 definitions.

Tree: GovLab Docs
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/docs#file-docs-core-plugins-manifest-metric-plugin-ts
Source text: https://banes-lab.com/source/docs/core/plugins/manifest.metric.plugin.ts.txt

Listed in [core/plugins](https://banes-lab.com/api/source/docs/core/plugins.md), after [core/plugins/manifest.grammar.plugin.ts](https://banes-lab.com/source/docs/core/plugins/manifest.grammar.plugin.ts.md) and before [core/plugins/manifest.package.plugin.ts](https://banes-lab.com/source/docs/core/plugins/manifest.package.plugin.ts.md).

## Definitions

- `SECTION` (lexical_declaration, line 4)
- `plugin` (lexical_declaration, line 6, exported)
- `validate` (method_definition, line 10, exported)
- `value` (lexical_declaration, line 11, exported)

## Contained in

- [core/plugins](https://banes-lab.com/anatomy/docs/folder-docs-core-plugins.md)

## Source

```typescript
import { MANIFEST_ERRORS } from "#configuration/strings/manifest.strings";
import type { ManifestPlugin } from "#types/manifest.types";

const SECTION = "repoMetrics";

export const plugin: ManifestPlugin = {
    name: "repo-metrics",
    section: {
        keys: [SECTION],
        validate(manifest) {
            const value = manifest[SECTION];
            return value === undefined || typeof value === "boolean" ? [] : [MANIFEST_ERRORS.repoMetrics];
        },
    },
};
```
