Skip to main content

Config authoring

The configuration preset checks Secretlint config files as repository policy. It is not a replacement for Secretlint's scanner or rule packages.

What to enforceโ€‹

  • Use an expected Secretlint config filename so tools and humans find it quickly.
  • Keep rules as an array and nested rules entries as arrays when present.
  • Require stable rule IDs.
  • Reject duplicate, empty, or relative rule IDs.
  • Reject unknown rule-object properties.
  • Verify referenced Secretlint rule packages are installed.

Exampleโ€‹

import secretlint from "eslint-plugin-secretlint";

export default [
{
files: [".secretlintrc.{json,yaml,yml,js,cjs,mjs}"],
...secretlint.configs.configuration,
},
];

Use the configuration preset for the curated set. Use the tool behavior map to decide whether a policy should be enforced by Secretlint or by one of this plugin's config-authoring rules.