Diagnostic codes: layers: An import goes from one part of a layers rule to a part earlier in its list. # layers > An import goes from one part of a layers rule to a part earlier in its list. 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. ## Example src/shared/format.ts ```ts // layers(['app', 'feature', 'shared']) import { login } from '../features/login'; ``` `layers(['app', 'feature', 'shared'])` is one sentence for each part after the first: ```ts rule({ files: 'feature', mayNotImport: ['app'] }) rule({ files: 'shared', mayNotImport: ['app', 'feature'] }) ``` ## What to do 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.