avoid-banned-exports

Path
lint/suspicious/avoid-banned-exports
Default
Off, opt in
Origin
Falcon
Rule
18 of 512

Ban decoded export URIs, including all conditional alternatives.

Invalid

example.dartdart
export 'package:legacy/api.dart';
export 'modern.dart' if (dart.library.io) 'package:legacy/io.dart';
export 'package:legacy/hidden.dart' hide Hidden;
export 'package:leg\x61cy/api.dart';
export 'modern.dart' if (dart.library.io) 'package:leg\u0061cy/io.dart';
Use the supported alternative.
1export 'package:legacy/api.dart';
Use the supported alternative.
1export 'package:legacy/api.dart';
2export 'modern.dart' if (dart.library.io) 'package:legacy/io.dart';
Use the supported alternative.
2export 'modern.dart' if (dart.library.io) 'package:legacy/io.dart';
3export 'package:legacy/hidden.dart' hide Hidden;
Use the supported alternative.
3export 'package:legacy/hidden.dart' hide Hidden;
4export 'package:leg\x61cy/api.dart';
Use the supported alternative.
4export 'package:leg\x61cy/api.dart';
5export 'modern.dart' if (dart.library.io) 'package:leg\u0061cy/io.dart';

Valid

example.dartdart
import 'package:legacy/api.dart';
export 'package:modern/api.dart';
export 'modern.dart' if (dart.library.io) 'modern_io.dart';
export 'package:mod\x65rn/api.dart';
export r'package:leg\x61cy/api.dart';

Configure avoid-banned-exports

Set its severity in falcon.json. See the configuration guide.

falcon.jsonjson
{
  "linter": {
    "rules": {
      "suspicious": {
        "avoid-banned-exports": "error"
      }
    }
  }
}

Or silence one occurrence with a suppression comment; the reason is required.

example.dartdart
// falcon-ignore lint/suspicious/avoid-banned-exports: <reason>