Skip to content

Rule violations. This text is what archangel docs layers prints.

An import goes from one part of a layers rule to a part earlier in its list.

src/shared/format.ts
// layers(['app', 'feature', 'shared'])
import { login } from '../features/login';

layers(['app', 'feature', 'shared']) is one sentence for each part after the first:

rule({ files: 'feature', mayNotImport: ['app'] })
rule({ files: 'shared', mayNotImport: ['app', 'feature'] })

Move the code that both need into the later part, or import it from a part later in the list. Parts outside the rule’s list are not checked by it.