Acton
Linting rules

E018: import-path-can-use-mappings

Warns when a relative import path can be replaced with a configured `@mapping/...` path.

Metadata

  • Code: E018
  • Rule: import-path-can-use-mappings
  • Status: Stable since v0.0.1
  • Quick fix: sometimes available

What it does

Warns when a relative import path can be replaced with a configured @mapping/... path.

Why is this bad?

Relative imports are harder to maintain in larger projects and become fragile when files move.

Example

import "../libs/math.tolk";
E018: import path can use mappings

Use instead:

import "@libs/math";
Source code

Last updated on

On this page