fluttercommunity / fluttercommunity/import_sorter

Sorter violates directives_ordering lint rule when file has named imports

Open
#28 15 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dart
Stars
183
Forks
42
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

In a file that contains relative import paths, and an absolute path to a named import, then the Dart linting rule `directives_ordering` fails.

**To Reproduce**

1. In your `analysis_options.yaml` file, enable the `directives_ordering` option (more info here: http://dart-lang.github.io/linter/lints/directives_ordering.html)
2. Create a file that contains the following:
1. An absolute path to a project import
2. An absolute path to a named project import
3. A relative path to a project import
3. Run the sorter
4. You should see a linting error (I'm using VSCode)

**Expected behavior**

The import sorter should respect conventional dart styling guidelines.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Meta Information:**
- Dart Version: SDK version `>=2.7.1 <3.0.0`
- `import_sorter` Version: 4.2.1
- Is it a Flutter project? No
- What version of Flutter are you using (if flutter project): N/a

**Additional context**
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.