Skip to content

Cross-file

Rule kinds in the Cross-file family. Each entry below has its own page with options, an example, and any auto-fix support.

  • pair — For every file matching primary, a file matching the partner template must exist.
  • for_each_dir — For every matching directory / file, evaluate a nested require: block with the entry as context.
  • for_each_file — For every matching directory / file, evaluate a nested require: block with the entry as context.
  • dir_contains — Every directory matching select: must contain files matching every glob in require:.
  • dir_only_contains — Every direct-child file of a directory matching select: must match at least one glob in allow:.
  • unique_by — No two files matching paths may share the value of key (a path template).
  • every_matching_has — For every file or directory matching select:, every nested rule under require: must be satisfied.