Saltar al contenido principal

avoid-double-slash-imports

added in: 1.0.0 warning

Warns when an import/export directive contains a double slash.

Double slash in the URI is considered valid, but under some circumstances the program won't run.

See:

Example

Bad:

import 'package:test//material.dart'; // LINT
import 'package:mocktail/good_file.dart';
import '../../..//rule_utils_test.dart'; // LINT

export 'package:mocktail//good_file.dart'; // LINT

part '../../..//individual/rules/empty.dart'; // LINT

Good:

import 'package:test/material.dart';
import 'package:mocktail/good_file.dart';
import '../../../rule_utils_test.dart';

export 'package:mocktail/good_file.dart';

part '../../../individual/rules/empty.dart';