Skip to content

Commit fc81b73

Browse files
committed
Release for dart 2.2
1 parent fc18733 commit fc81b73

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changlog
22

3+
## 0.2.0
4+
5+
- Fix `analysis_options_package.yaml` (wrong import)
6+
- Release for Dart 2.2. All incompatible rules are removed
7+
38
## 0.1.1
49
- `pubspec.yaml` `homepage` fix
510

lib/analysis_options.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ linter:
115115

116116
# Don't call print in production code
117117
# https://dart-lang.github.io/linter/lints/avoid_print.html
118-
- avoid_print
118+
# dart 2.2 incompatible
119+
#- avoid_print
119120

120121
# Always prefer function references over typedefs.
121122
# Jumping twice in code to see the signature of a lambda sucks. This is different from the flutter analysis_options
@@ -192,8 +193,9 @@ linter:
192193
- await_only_futures
193194

194195
# Follow the style guide and use UpperCamelCase for extensions
196+
# Wait for dart 2.6 release
195197
# https://dart-lang.github.io/linter/lints/camel_case_extensions.html
196-
- camel_case_extensions
198+
# - camel_case_extensions
197199

198200
# Follow the style guide and use UpperCamelCase for class names and typedefs
199201
# https://dart-lang.github.io/linter/lints/camel_case_types.html
@@ -445,7 +447,8 @@ linter:
445447

446448
# Saves lot of code
447449
# https://dart-lang.github.io/linter/lints/prefer_for_elements_to_map_fromIterable.html
448-
- prefer_for_elements_to_map_fromIterable
450+
# dart 2.2 incompatible
451+
#- prefer_for_elements_to_map_fromIterable
449452

450453
# Dense code isn't necessarily better code
451454
# https://dart-lang.github.io/linter/lints/prefer_foreach.html
@@ -461,19 +464,22 @@ linter:
461464

462465
# Allows potential usage of const
463466
# https://dart-lang.github.io/linter/lints/prefer_if_elements_to_conditional_expressions.html
464-
- prefer_if_elements_to_conditional_expressions
467+
# dart 2.2 incompatible
468+
#- prefer_if_elements_to_conditional_expressions
465469

466470
# Dart has a special operator for this, use it
467471
# https://dart-lang.github.io/linter/lints/prefer_if_null_operators.html
468-
- prefer_if_null_operators
472+
# dart 2.2 incompatible
473+
#- prefer_if_null_operators
469474

470475
# Terser code
471476
# https://dart-lang.github.io/linter/lints/prefer_initializing_formals.html
472477
- prefer_initializing_formals
473478

474479
# Easier move towards const, and way easier to read
475480
# https://dart-lang.github.io/linter/lints/prefer_inlined_adds.html
476-
- prefer_inlined_adds
481+
# dart 2.2 incompatible
482+
#- prefer_inlined_adds
477483

478484
# There is no argument which makes int literals better than double literals for doubles.
479485
# https://dart-lang.github.io/linter/lints/prefer_int_literals.html
@@ -510,7 +516,8 @@ linter:
510516

511517
# Allows potential usage of const
512518
# https://dart-lang.github.io/linter/lints/prefer_spread_collections.html
513-
- prefer_spread_collections
519+
# dart 2.2 incompatible
520+
#- prefer_spread_collections
514521

515522
# Define types
516523
# https://dart-lang.github.io/linter/lints/prefer_typing_uninitialized_variables.html
@@ -538,7 +545,8 @@ linter:
538545

539546
# Flutter only, always put child last
540547
# https://dart-lang.github.io/linter/lints/sort_child_properties_last.html
541-
- sort_child_properties_last
548+
# dart 2.2 incompatible
549+
#- sort_child_properties_last
542550

543551
# Might not be perfect but results in consistent code
544552
# https://dart-lang.github.io/linter/lints/sort_constructors_first.html
@@ -640,7 +648,8 @@ linter:
640648

641649
# Web only
642650
# https://dart-lang.github.io/linter/lints/unsafe_html.html
643-
- unsafe_html
651+
# dart 2.2 incompatible
652+
#- unsafe_html
644653

645654
# Use rethrow to preserve the original stacktrace.
646655
# https://dart.dev/guides/language/effective-dart/usage#do-use-rethrow-to-rethrow-a-caught-exception

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: lint
2-
version: 0.1.1
2+
version: 0.2.0
33
description: An opiniated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
44
author: Pascal Welsch <[email protected]>
55
homepage: https://github.com/passsy/dart-lint
66

77
environment:
8-
sdk: '>=2.2.0 <3.0.0'
8+
sdk: '>=2.2.0 <2.3.0'

0 commit comments

Comments
 (0)