combinators-ordering
Same as combinators_ordering in Dart lints
- Group
- Style
- Path
lint/style/combinators-ordering- Default
- Off, opt in
- Origin
- Dart lints
- Rule
- 206 of 512
Flags show/hide combinators whose names are not sorted alphabetically.
Sorted combinator lists are easier to scan and produce smaller diffs when a
name is added. Each show or hide clause on an import or export is checked
on its own; the clause is reported when its names are out of order:
import 'a.dart' show B, A; // flagged
import 'a.dart' show A, B hide D, C; // `hide D, C` flagged
import 'a.dart' show A, B;
Invalid
// Combinator names must be sorted alphabetically.
import 'dart:async' show Timer, Future;
import 'dart:collection' hide Queue, LinkedList;
import 'dart:math' show max, min, Random;
import 'dart:convert' show utf8, json hide base64;
export 'dart:io' show stdout, File;
export 'dart:typed_data' hide Uint8List, ByteData;
void main() {}// Combinator names must be sorted alphabetically.import 'dart:async' show Timer, Future;import 'dart:async' show Timer, Future;import 'dart:collection' hide Queue, LinkedList;import 'dart:collection' hide Queue, LinkedList;import 'dart:math' show max, min, Random;import 'dart:math' show max, min, Random;import 'dart:convert' show utf8, json hide base64;import 'dart:convert' show utf8, json hide base64;export 'dart:io' show stdout, File;export 'dart:io' show stdout, File;export 'dart:typed_data' hide Uint8List, ByteData;Valid
// Sorted combinators, single names, and directives without combinators.
import 'dart:async' show Future, Timer;
import 'dart:collection' hide LinkedList, Queue;
import 'dart:math' show Random, max, min;
import 'dart:convert' show json, utf8 hide base64;
import 'dart:developer';
export 'dart:io' show File, stdout;
export 'dart:typed_data' hide ByteData;
void main() {}Configure combinators-ordering
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"style": {
"combinators-ordering": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/style/combinators-ordering: <reason>More style rules
- conditional-uri-does-not-exist
conditional_uri_does_not_existrecommendedRequire the targets of conditional import and export URIs to exist.
- constant-identifier-names
constant_identifier_namesrecommendedFlags constant identifiers that are not lowerCamelCase.
- curly-braces-in-flow-control-structures
curly_braces_in_flow_control_structuresrecommendedRequires curly braces around the bodies of flow-control statements.
- dangling-library-doc-comments
dangling_library_doc_commentsrecommendedAttach library documentation to an explicit
librarydirective. - deprecated-consistency
deprecated_consistencyrecommendedFlags deprecations that are not carried through to related declarations.
- directives-ordering
directives_orderingFlags import and export directives that break the Effective Dart ordering.
- do-not-use-environment
do_not_use_environmentDisallow reading compilation environment declarations, including type aliases.
- double-literal-format
double-literal-formatFlags double literals written with redundant or missing digits.