Skip to content

Consider new lints for inclusion simple_directive_paths #978

Closed

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';

Activity

  1. natebosch commented on Jul 15, 2026

    @natebosch
    MemberAuthor

    I'm in favor of putting this in recommended. I think it's low impact, but it will probably be helpful on occasion and shouldn't ever be harmful.

  2. natebosch commented on Jul 15, 2026

    @natebosch
    MemberAuthor

    Decision: recommended

  3. added a commit that references this issue on Nov 3, 2026
    9727aad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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