Skip to content

Commit

Permalink
Update dart_flutter_team_lints to depend on lints v4
Browse files Browse the repository at this point in the history
  • Loading branch information
parlough committed May 10, 2024
1 parent 9ce560b commit 3b52af8
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 59 deletions.
117 changes: 74 additions & 43 deletions .github/workflows/dart.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pkgs/dart_flutter_team_lints/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 2.1.2-wip
## 3.0.0

- Depend on the `4.0.0` release of `package:lints` adding
the `no_wildcard_variable_uses` lint.
- Require Dart `3.1.0` or later.

## 2.1.1

Expand Down
1 change: 0 additions & 1 deletion pkgs/dart_flutter_team_lints/lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ linter:
# consistency
- combinators_ordering
- directives_ordering
- library_annotations
- lines_longer_than_80_chars
- omit_local_variable_types
- prefer_asserts_in_initializer_lists
Expand Down
6 changes: 3 additions & 3 deletions pkgs/dart_flutter_team_lints/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: dart_flutter_team_lints
description: An analysis rule set used by the Dart and Flutter teams.
version: 2.1.2-wip
version: 3.0.0
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/dart_flutter_team_lints

environment:
sdk: ^3.0.0
sdk: ^3.1.0

dependencies:
lints: ^3.0.0
lints: ^4.0.0

dev_dependencies:
checks: ^0.3.0
Expand Down
18 changes: 7 additions & 11 deletions tool/ci.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash
# Created with package:mono_repo v6.6.0
# Created with package:mono_repo v6.6.1

# Support built in commands on windows out of the box.

# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# then "flutter pub" is called instead of "dart pub".
# This assumes that the Flutter SDK has been installed in a previous step.
function pub() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
Expand All @@ -12,18 +13,13 @@ function pub() {
command dart pub "$@"
fi
}
# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# This assumes that the Flutter SDK has been installed in a previous step.

function format() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
command flutter format "$@"
else
command dart format "$@"
fi
command dart format "$@"
}

# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter")
# then "flutter" is called instead of "pub".
# then "flutter analyze" is called instead of "dart analyze".
# This assumes that the Flutter SDK has been installed in a previous step.
function analyze() {
if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then
Expand Down

0 comments on commit 3b52af8

Please sign in to comment.