Skip to content

Commit e8927c0

Browse files
authored
refactor: replace to flutter_lints (#137)
* refactor: change to flutter_lints * style: fix surround symbol
1 parent 66ba708 commit e8927c0

27 files changed

+157
-124
lines changed

example/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:effective_dart/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22

33
linter:
44
rules:

example/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void main() {
2323
mainAxisAlignment: MainAxisAlignment.center,
2424
children: <Widget>[
2525
// Auto generated image from FlutterGen.
26-
Container(
26+
SizedBox(
2727
width: 200,
2828
height: 200,
2929
child: Assets.flare.penguin.flare(
@@ -32,14 +32,14 @@ void main() {
3232
),
3333
),
3434
Image(image: Assets.images.chip1),
35-
Assets.images.icons.kmm.svg(key: Key("kmm_svg")),
35+
Assets.images.icons.kmm.svg(key: const Key("kmm_svg")),
3636
Assets.images.icons.fuchsia.svg(),
3737
Assets.images.icons.paint.svg(
3838
width: 120,
3939
height: 120,
4040
),
4141
Assets.pictures.chip5.image(
42-
key: Key("chip5"),
42+
key: const Key("chip5"),
4343
width: 120,
4444
height: 120,
4545
fit: BoxFit.scaleDown,

example/pubspec.lock

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,6 @@ packages:
176176
url: "https://pub.dartlang.org"
177177
source: hosted
178178
version: "0.7.1"
179-
effective_dart:
180-
dependency: "direct dev"
181-
description:
182-
name: effective_dart
183-
url: "https://pub.dartlang.org"
184-
source: hosted
185-
version: "1.3.2"
186179
fake_async:
187180
dependency: transitive
188181
description:
@@ -230,6 +223,13 @@ packages:
230223
relative: true
231224
source: path
232225
version: "4.0.0"
226+
flutter_lints:
227+
dependency: "direct dev"
228+
description:
229+
name: flutter_lints
230+
url: "https://pub.dartlang.org"
231+
source: hosted
232+
version: "1.0.4"
233233
flutter_svg:
234234
dependency: "direct main"
235235
description:
@@ -298,6 +298,13 @@ packages:
298298
url: "https://pub.dartlang.org"
299299
source: hosted
300300
version: "4.1.0"
301+
lints:
302+
dependency: transitive
303+
description:
304+
name: lints
305+
url: "https://pub.dartlang.org"
306+
source: hosted
307+
version: "1.0.1"
301308
logging:
302309
dependency: transitive
303310
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dev_dependencies:
2323
flutter_gen_runner:
2424
path: ../packages/runner
2525

26-
effective_dart: '>=1.3.1 <2.0.0'
26+
flutter_lints: '>=1.0.4 < 2.0.0'
2727

2828
flutter_gen:
2929
output: lib/gen/ # Optional (default: lib/gen/)

packages/command/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:effective_dart/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22

33
linter:
44
rules:

packages/command/bin/flutter_gen_command.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ void main(List<String> args) {
2424
try {
2525
results = parser.parse(args);
2626
if (results.wasParsed('help')) {
27+
// ignore: avoid_print
2728
print(parser.usage);
2829
return;
2930
}

packages/command/pubspec.lock

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ packages:
9292
url: "https://pub.dartlang.org"
9393
source: hosted
9494
version: "0.7.1"
95-
effective_dart:
96-
dependency: "direct dev"
97-
description:
98-
name: effective_dart
99-
url: "https://pub.dartlang.org"
100-
source: hosted
101-
version: "1.3.2"
10295
file:
10396
dependency: transitive
10497
description:
@@ -113,6 +106,13 @@ packages:
113106
relative: true
114107
source: path
115108
version: "4.0.0"
109+
flutter_lints:
110+
dependency: "direct dev"
111+
description:
112+
name: flutter_lints
113+
url: "https://pub.dartlang.org"
114+
source: hosted
115+
version: "1.0.4"
116116
glob:
117117
dependency: transitive
118118
description:
@@ -127,6 +127,13 @@ packages:
127127
url: "https://pub.dartlang.org"
128128
source: hosted
129129
version: "4.1.0"
130+
lints:
131+
dependency: transitive
132+
description:
133+
name: lints
134+
url: "https://pub.dartlang.org"
135+
source: hosted
136+
version: "1.0.1"
130137
meta:
131138
dependency: transitive
132139
description:

packages/command/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
args: '>=2.0.0 <3.0.0'
1919

2020
dev_dependencies:
21-
effective_dart: '>=1.3.1 <2.0.0'
21+
flutter_lints: '>=1.0.4 < 2.0.0'
2222

2323
# TODO: When publish to pub.dev, disabled the dependencies_override
2424
dependency_overrides:

packages/core/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:effective_dart/analysis_options.yaml
1+
include: package:flutter_lints/flutter.yaml
22

33
analyzer:
44
exclude:

packages/core/lib/flutter_generator.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: avoid_print
2+
13
import 'dart:io';
24

35
import 'package:dart_style/dart_style.dart';

0 commit comments

Comments
 (0)