Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dart_style and use latestLanguageVersion #301

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web_generator/lib/src/dart_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ String _emitLibrary(code.Library library) {
);

final source = library.accept(emitter);
return DartFormatter(experimentFlags: [inlineClassExperimentFlag])
return DartFormatter(languageVersion: DartFormatter.latestLanguageVersion)
.format(source.toString());
}
3 changes: 0 additions & 3 deletions web_generator/lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ final List<String> mozLicenseHeader = [
'under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/.',
];

// Needed for dart_style until 2.3.5 is published.
const String inlineClassExperimentFlag = 'inline-class';

const String generatedFileDisclaimer = 'Generated from Web IDL definitions.';

extension StringExt on String {
Expand Down
2 changes: 1 addition & 1 deletion web_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
code_builder: ^4.10.0
collection: ^1.18.0
dart_flutter_team_lints: ^3.0.0
dart_style: ^2.3.4
dart_style: ^2.3.7
io: ^1.0.4
path: ^1.8.3
test: ^1.24.4