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

Pass a language version to DartFormatter(). #652

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

munificent
Copy link
Collaborator

We're in the process of moving dart_style to a new formatting style. That involves making the formatter aware of the language version of what it's formatting.

That in turn means that the library API now lets you pass in a language version. In dart_style 2.3.7 you can pass in a language version but the parameter is optional. In the forthcoming 3.0.0 release, that parameter will become mandatory.

This updates the call to DartFormatter() to pass in the latest language version. If there's a more specific version that should be used, let me know and I'll update the PR.

We're in [the process of](dart-lang/dart_style#1403) moving dart_style to [a new formatting style](dart-lang/dart_style#1253). That involves making the formatter [aware of the language version of what it's formatting](dart-lang/dart_style#1402).

That in turn means that the library API now lets you pass in a language version. In dart_style 2.3.7 [you can pass in a language version but the parameter is optional](https://pub.dev/documentation/dart_style/latest/dart_style/DartFormatter/DartFormatter.html). In the forthcoming 3.0.0 release, that parameter will become mandatory.

This updates the call to `DartFormatter()` to pass in the latest language version. If there's a more specific version that should be used, let me know and I'll update the PR.
@munificent munificent merged commit e7ae6b2 into master Oct 25, 2024
23 checks passed
@munificent munificent deleted the dart-style-language-version branch October 25, 2024 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants