Skip to content

must-not-exist

Markdown for agents

Rule violations. This text is what archangel docs must-not-exist prints.

A file is in the files of a mustNotExist rule, such as a file in no part or in a reserved folder.

// rule({ files: { all: ['src/**', { not: { element: '*' } }] }, mustNotExist: true })
// src/stray.ts, which no element's pattern matches

With folders instead of files, the rule gives one violation for each folder it covers, not one for each file in it:

rule({ folders: 'src/processes', mustNotExist: true })

Move the file to where the architecture puts it, or delete it. The files or folders of a mustNotExist rule may match nothing, because that is how the rule passes.