Skip to content

Consider new lints for inclusion simple_directive_paths #978

Description

@natebosch

https://dart.dev/tools/linter-rules/simple_directive_paths

PREFER simple directive paths.

Using simple directive paths (avoiding redundant ./ or backtracking ../ segments) makes the code cleaner, more consistent, and easier to read. It also reduces the risk of confusion when resolving paths relative to the source file.

BAD:

import '../src/bar.dart';

GOOD:

import 'bar.dart';

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions