This repository was archived by the owner on Nov 20, 2024. It is now read-only.
File tree 2 files changed +14
-2
lines changed 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ # 1.3.1
2
+
3
+ - ` directives_ordering ` now checks ordering of ` package: ` imports in code
4
+ outside pub packages
5
+
1
6
# 1.3.0
2
7
3
8
- ` non_constant_identifier_names ` updated to check local variables, for-loop
22
27
23
28
- fixed ` prefer_mixin ` to properly make exceptions for ` dart.collection ` legacy
24
29
mixins
25
- - improved formatting of source examples in docs
30
+ - improved formatting of source examples in docs
26
31
- new lint: ` use_build_context_synchronously ` (experimental)
27
32
- new lint: ` avoid_multiple_declarations_per_line `
28
33
Original file line number Diff line number Diff line change @@ -271,7 +271,14 @@ class _Visitor extends SimpleAstVisitor<void> {
271
271
_checkSectionInOrder (lintedNodes, relativeExports);
272
272
273
273
var projectName = project? .name;
274
- if (projectName != null ) {
274
+ if (projectName == null ) {
275
+ // Not a pub package. Package directives should be sorted in one block.
276
+ var packageImports = importDirectives.where (_isPackageDirective);
277
+ var packageExports = exportDirectives.where (_isPackageDirective);
278
+
279
+ _checkSectionInOrder (lintedNodes, packageImports);
280
+ _checkSectionInOrder (lintedNodes, packageExports);
281
+ } else {
275
282
var packageBox = _PackageBox (projectName);
276
283
277
284
var thirdPartyPackageImports =
You can’t perform that action at this time.
0 commit comments