Skip to content

Rule catalog

Every built-in rule, its defaults, and every option it accepts. The config file format is documented in configuration.md. The reasoning behind each rule is in its linked guideline, also available as vibator explain <rule>. Rules with a default severity of off require their mandatory options before they can run.

no-conflict-markers

No unresolved merge conflict markers.

No options.

max-file-size

No oversized files in version control.

OptionTypeDefaultPurpose
maxKbinteger400Largest accepted file, in kilobytes

banned-patterns

Project-banned patterns stay out of the source.

  • Scope: file. Default severity: off
  • Default include: **/src/**/*.{ts,tsx,js,jsx,mjs,cjs}
  • Default exclude: **/*.test.*, **/*.spec.*
  • Guideline: rules/banned-patterns.md
OptionTypeDefaultPurpose
patternsobject[]requiredThe patterns to ban, each carrying its own diagnostic text
patterns[].patternstringrequiredJavaScript regular expression source, matched per line
patterns[].flagsstring""Regular expression flags, such as i
patterns[].messagestringrequiredWhat is wrong when the pattern matches
patterns[].expectedstringrequiredThe standard, positively stated
patterns[].fixstringrequiredThe concrete next action
ignoreMarkersstring[]["vibator-ignore"]Comment markers that opt a line out, each requiring a reason

Relative links in Markdown point at files that exist.

No options.

locale-parity

Every locale carries the same keys as the source.

  • Scope: project. Default severity: off
  • Default include: none; configure to enable
  • Guideline: rules/locale-parity.md
OptionTypeDefaultPurpose
rootstringrequiredDirectory holding the locale catalogs
sourcestring"en"The locale every other is seeded from
layout"directory-per-locale" or "file-per-locale""directory-per-locale"directory-per-locale expects root/<locale>/<namespace>.json; file-per-locale expects root/<locale>.json
localesstring[](none)The locales to check; discovered from the layout when omitted

env-example-sync

The example env file matches what the code reads.

  • Scope: project. Default severity: warn
  • Default include: **/src/**/*.{ts,tsx,js,jsx}
  • Default exclude: **/*.test.*, **/*.spec.*
  • Guideline: rules/env-example-sync.md
OptionTypeDefaultPurpose
examplestring".env.example"The file documenting every configurable variable
ambientstring[]see schema.jsonVariables the runtime, bundler or CI supplies, never documented
externallyConsumedstring[][]Variables consumed outside the scanned sources, e.g. by compose
reportUnreadbooleantrueWhether to report documented variables that nothing reads

tsdoc-coverage

Every declaration carries a complete TSDoc contract.

  • Scope: project. Default severity: error
  • Default include: **/src/**/*.{ts,tsx}
  • Default exclude: **/*.test.*, **/*.spec.*, **/*.d.ts
  • Guideline: rules/tsdoc-coverage.md
OptionTypeDefaultPurpose
requireOn"all" or "exported""all"Which declarations must carry documentation
requireParamsbooleantrueWhether every parameter needs a @param tag
requireReturnsbooleantrueWhether value-returning signatures need a @returns tag
maxInlineCommentLinesinteger2Longest run of consecutive own-line // comments allowed

meaningful-names

Identifiers we declare carry meaning.

  • Scope: project. Default severity: error
  • Default include: **/src/**/*.{ts,tsx}
  • Default exclude: **/*.d.ts
  • Guideline: rules/meaningful-names.md
OptionTypeDefaultPurpose
ignoreMarkersstring[]["vibator-ignore"]comment markers that opt a line out, each requiring a reason
minLengthinteger3Identifiers shorter than this must be allowlisted
allowstring[]["id","ip","ok","db","on","to","up","x","y","z"]Short names that carry meaning, or that a library imposes
denystring[]see schema.jsonNames long enough to pass the bar but still meaningless

prefer-array-methods

Array methods over single-statement loops.

OptionTypeDefaultPurpose
ignoreMarkersstring[]["vibator-ignore"]comment markers that opt a line out, each requiring a reason

no-deprecated-apis

No use of APIs marked @deprecated.

  • Scope: project. Default severity: error
  • Default include: **/src/**/*.{ts,tsx}, *.config.ts
  • Default exclude: **/*.d.ts
  • Guideline: rules/no-deprecated-apis.md
OptionTypeDefaultPurpose
projectsstring[]["tsconfig.json"]tsconfig paths whose programs this rule resolves against

codegen-drift

Generated files match the source they derive from.

  • Scope: project. Default severity: off
  • Default include: none; configure to enable
  • Guideline: rules/codegen-drift.md
OptionTypeDefaultPurpose
generatorsobject[]requiredGenerators to run, each with the paths it owns
generators[].namestringrequiredHuman-readable name, used in messages
generators[].commandstringrequiredShell command that regenerates the output
generators[].cwdstring"."Working directory, relative to the project root
generators[].pathsstring[]requiredPaths the generator writes, relative to the project root
generators[].timeoutMsinteger180000How long to allow before treating the run as stuck, ms

Released under the MIT License.