avoid-duplicate-exports
- Group
- Correctness
- Path
lint/correctness/avoid-duplicate-exports- Default
- Off, opt in
- Origin
- Falcon
- Rule
- 48 of 512
Flags export directives whose visible names are already covered by another export. URI values and conditional branches must match; show/hide chains are compared as sets, so disjoint or partially overlapping visibility remains untouched.
Invalid
export 'a.dart';
export 'a.dart';
export 'b.dart';
export 'b.dart' show B;
export 'c.dart' show C, D;
export 'c.dart' show C;
export 'd.dart' hide D;
export 'd.dart' show E;
export 'e.dart' hide E;
export 'e.dart' hide E, F;
export 'f.dart' show F;
export 'f.dart';
export 'g.dart' if (dart.library.io) 'io.dart';
export 'g.dart' if (dart.library.io) 'io.dart' show G;
export 'h.dart';
export "h.dart";
export 'relative.dart';
export './relative.dart' show Relative;
export 'nested/../relative.dart' show Relative;
export 'sub/a.dart';
export './sub/a.dart' show A;export 'a.dart';export 'a.dart';export 'b.dart';export 'b.dart' show B;export 'c.dart' show C, D;export 'c.dart' show C;export 'd.dart' hide D;export 'd.dart' show E;export 'e.dart' hide E;export 'e.dart' hide E, F;export 'e.dart' hide E, F;export 'f.dart' show F;export 'g.dart' if (dart.library.io) 'io.dart';export 'g.dart' if (dart.library.io) 'io.dart' show G;export 'h.dart';export "h.dart";export 'relative.dart';export './relative.dart' show Relative;export './relative.dart' show Relative;export 'nested/../relative.dart' show Relative;export 'sub/a.dart';export './sub/a.dart' show A;Valid
export 'a.dart' show A;
export 'a.dart' show B;
export 'b.dart' show B, C;
export 'b.dart' show C, D;
export 'c.dart' hide C;
export 'c.dart' show C;
export 'd.dart' hide A;
export 'd.dart' hide B;
export 'e.dart';
export 'e.dart' if (dart.library.io) 'io.dart';
export 'f.dart' if (dart.library.io) 'one.dart';
export 'f.dart' if (dart.library.io) 'two.dart';
export 'g.dart' if (dart.library.io) 'io.dart';
export 'g.dart' if (dart.library.html) 'html.dart';
export '//host/a/../network.dart';
export '/host/network.dart';
export 'percent%2E.dart';
export 'percent.dart';Configure avoid-duplicate-exports
Set its severity in falcon.json. See the configuration guide.
{
"linter": {
"rules": {
"correctness": {
"avoid-duplicate-exports": "error"
}
}
}
}Or silence one occurrence with a suppression comment; the reason is required.
// falcon-ignore lint/correctness/avoid-duplicate-exports: <reason>More correctness rules
- avoid-duplicate-factories
Flags factories in one type with the same implementation, ignoring factory names and alpha-renaming parameters by position.
- avoid-duplicate-initializers
Flags final/const variables with identical initializers in the same scope.
- avoid-duplicate-map-keysrecommended
Flags repeated literal keys in map literals, including literal spreads and collection
ifentries. - avoid-duplicate-mixins
Flags repeated mixins in a with clause or a same-library superclass chain.
- avoid-duplicate-named-imports
Flags imports of the same library that differ only in their name prefix.
- avoid-duplicate-switch-case-conditionsrecommended
Flags repeated
whenguards on syntactically identical switch patterns. - avoid-duplicate-test-assertionsrecommendedtest
Reports repeated identical, side-effect-free assertions in a straight-line block.
- avoid-dynamic-calls
avoid_dynamic_callsrecommendedAvoid method calls or property accesses on a
dynamictarget.