Using Allocator.simplePrefixing() with a library decalaration resulted in bad formatted code:
Library((b) => b
..docs.add(
'/// My favorite library.',
)
..body.add(Field((b) => b
..name = 'test'
..modifier = FieldModifier.final$
..assignment = Code.scope((a) => '${a($LinkedHashMap)}()'))))
was generating:
/// My favorite library.
library; // ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:collection' as _i1;
final test = _i1.LinkedHashMap();
This PR merges the no_leading_underscores_for_library_prefixes ignore with the other file level ignores for better readable code.
[x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before creating a PR.
- Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`.
- Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change).
- Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing).
Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
Using
Allocator.simplePrefixing()
with a library decalaration resulted in bad formatted code:was generating:
This PR merges the
no_leading_underscores_for_library_prefixes
ignore with the other file level ignores for better readable code.Contribution guidelines:
- See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.