Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prefer_relative_imports and use absolute package imports #169

Closed
ben-xD opened this issue Sep 15, 2021 · 0 comments · Fixed by #213
Closed

Remove prefer_relative_imports and use absolute package imports #169

ben-xD opened this issue Sep 15, 2021 · 0 comments · Fixed by #213
Assignees
Labels
enhancement New feature or improved functionality.

Comments

@ben-xD
Copy link
Contributor

ben-xD commented Sep 15, 2021

In analysis_options.yaml, we have

    # personal preference this conflicts with prefer_relative_imports
    # - always_use_package_imports

and

prefer_relative_imports # personal preference
  • This reduces developer experience, because the IDE plugin (Flutter-Intellij, which is used in Android Studio too) auto-imports using absolute package paths, not relative paths. This rule goes against the default, and reduces efficiency with development because they have to explicitly fix the imports to be relative again: annoying/ waste of time. Therefore, it's not really personal preference.
  • Current problem: Because of the plugin, these imports are already inconsistent. Some imports are relative, some are absolute, because again, the IDE automatically creates absolute ones.

TLDR: In this issue, we should remove the above code snippets, opting for always_use_package_imports instead. Then, we would update the paths. This would allow new developers to be productive and avoid linter warnings when auto importing anything.

┆Issue is synchronized with this Jira Story by Unito

@ben-xD ben-xD added the enhancement New feature or improved functionality. label Sep 15, 2021
@ben-xD ben-xD changed the title Remove prefer_relative_imports and use full the files Remove prefer_relative_imports and use absolute package imports Sep 15, 2021
@ben-xD ben-xD self-assigned this Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improved functionality.
1 participant