Comments (13)
Yes please! The linter should complain if:
- imports are not correctly grouped into dart:, package: and relative imports
- groups are not separated by a blank line
- imports are not sorted alphabetically within groups
from linter.
any further plans on this?
from linter.
Hopefully we can get this in the style guide too: dart-archive/www.dartlang.org#635
from linter.
Yes please. And thanks for the link @seaneagan. I was just looking for it myself! :)
from linter.
any further plans on this?
Sorry. Haven't gotten to it but it's definitely a good idea and doable. Added to a new tracking milestone NEXT
.π
from linter.
I think that with this week's contributions we can close this.
from linter.
Hi,
Sorry to get this one out after so long, but I don't think dartfmt does sort the import, right?
Should this ticket be re-opened?
Regards,
RaphaΓ«l
from linter.
@rdehouss: I think what you're after was implemented in directives_ordering
. Let us know if that works for you!
from linter.
Hi @pq, no, I was coming from dart-lang/sdk#20244 looking for a solution like https://github.com/timothycrosley/isort to sort automatically the import so that I don't have to fix each lint issues manually. But I understand that I'm now in the linter project and left dartfmt, sorry
from linter.
Ah. Got it. What we need here minimally is a quickfix for directives_ordering
(as noted in #1374) and ideally support in something like dartfix
so that there's more of a CLI for bulk application of the fix.
/fyi @bwilkerson
from linter.
The implementation of the quick fix should be largely the same as the implementation of the edit.organizeDirectives
request. It should be fairly easy to refactor the code to make it reusable for both purposes.
from linter.
Cool. I was looking at this recently. I created an issue and will take a look (unless @bwilkerson you already are!)
from linter.
No, I'm not looking at it.
from linter.
Related Issues (20)
- Recursive getter does not throw warning when using pattern matching HOT 2
- `unnecessary_lambdas` constructor tear-off false postitives HOT 3
- False positive for `use_is_even_rather_than_modulo`
- proposal: `operator_is_tests_a_type`
- require_trailing_commas highlights the wrong token on named parameter lists. HOT 3
- [use_rethrow_when_possible] False positive in a switch expression HOT 3
- proposal: `use_build_context_synchronously` should lint unsafe usages of sync then(), catchError() and whenComplete() callbacks HOT 2
- [macros] support for `one_member_abstracts` HOT 1
- [macros] support for `annotate_overrides` HOT 5
- [macros] support for `avoid_field_initializers_in_const_classes` HOT 1
- [macros] π‘ support for `annotate_redeclares`
- [macros] support for `avoid_setters_without_getters`
- [macros] support for `hash_and_equals` HOT 1
- [macros] support for `overridden_fields` HOT 1
- [macros] support for `avoid_classes_with_only_static_members` HOT 1
- [macros] support for `avoid_equals_and_hash_code_on_mutable_classes` HOT 1
- [macros] π‘ support for `constant_identifier_names` (augmentation enums) HOT 1
- [macros] support for `avoid_unused_constructor_parameters` HOT 1
- [macros] support for `unnecessary_getters_setters`
- `use_key_in_widget_constructors` triggers even though augmented class uses key HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter.