Skip to content
1 min read · 185 words

eslint

Remarks

These rules turn documented footguns into lint errors. They are report-only (no autofix) — each names the contract it enforces and the fix; carve out a deliberate exception with an inline // eslint-disable-next-line adk/<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 main library never imports this module.

Example

ts
import adk from "@nhtio/adk/eslint";

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

Variables

VariableDescription
configsNamed config presets. recommended enables every rule at error and registers the plugin under the adk namespace — spread it into a flat config to adopt the full set.
defaultDefault export bundles the plugin and its config presets, mirroring the shape ESLint flat configs expect from a plugin module.
pluginThe ESLint plugin object. Register under the adk namespace: plugins: { adk: plugin }.
rulesMap of rule id (without the adk/ plugin prefix) to its rule object. Registered on the plugin as rules, so configs reference them as adk/<id>.