Feature request: Ability to skip an import

Author: abierbaumCreated Sep 24, 2019Updated Mar 19, 2024
Labelsquestion

Context

I would like to use dependency-cruiser on our codebase as part of the auto build to validate correct imports. Unfortunately we have many places in the code base that are causing false errors or maybe more specifically, errors we simply want to ignore because they are ok.

Similar to linting tools I would like a way to tell dependency-cruiser to skip the next import line.

I have searched the documentation but can't find a way to do this.

Possible Solution

// dependency-cruiser:ignore-next-line
import {X} from 'bad/package';

Source: sverweij/dependency-cruiser