Skip to content
1 min read · 258 words

batteries/skills/lint ​

Remarks ​

Battery-scoped rules ship with the battery, not with the core @nhtio/adk/eslint plugin — they only matter to deployments that compose this battery, and they version with the battery's own API. The rules are report-only (no autofix); carve out a deliberate exception with an inline // eslint-disable-next-line adk-skills/{rule} -- {reason} comment.

@typescript-eslint/utils and eslint are OPTIONAL peer dependencies of @nhtio/adk — installed only by consumers who lint with this plugin. The skills runtime never imports this module, and the batteries/skills barrel does not re-export it.

Example ​

Flat config

ts
import adkSkills from "@nhtio/adk/batteries/skills/lint";

export default [
  {
    plugins: { "adk-skills": adkSkills.plugin },
    rules: adkSkills.configs.recommended.rules,
  },
];

Variables ​

VariableDescription
configsNamed config presets. recommended registers the plugin under the adk-skills namespace and enables every rule: require-gate at error (construction throws without it), and no-unsafe-opt-in at warn (a review signal, silenced per line with a reason when meant).
defaultDefault export bundles the plugin and its config presets, mirroring the shape ESLint flat configs expect from a plugin module.
pluginThe skills battery's ESLint plugin object. Register under the adk-skills namespace: plugins: { 'adk-skills': plugin }.
rulesMap of rule id (without the adk-skills/ plugin prefix) to its rule object. Registered on the plugin as rules, so configs reference them as adk-skills/{id}.
UNSAFE_CONTROLSThe unsafe containment controls, one message each, naming the safety boundary the opt-in removes. The wording follows the TSDoc on unsafe in types.ts; a drift test pins this table to the declared shape of both configs.