Skip to content

Commit e23e5ba

Browse files
committed
Fix lints
1 parent e7511a1 commit e23e5ba

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ analyzer:
1111
included_file_warning: ignore
1212
# false positive when using Freezed
1313
invalid_annotation_target: ignore
14+
## Too painful to upgrade analyzer, and an official Google package is coming
15+
deprecated_member_use: ignore
1416

1517
linter:
1618
rules:
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# include: ../analysis_options.yaml
1+
include: ../analysis_options.yaml
22

3-
# linter:
4-
# rules:
5-
# public_member_api_docs: false
6-
# avoid_print: false
3+
linter:
4+
rules:
5+
public_member_api_docs: false
6+
avoid_print: false

packages/custom_lint/example/example_lint/lib/custom_lint_example_lint.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PluginBase createPlugin() => _RiverpodLint();
2323
class _RiverpodLint extends PluginBase {
2424
@override
2525
List<LintRule> getLintRules(CustomLintConfigs configs) => [
26-
PreferFinalProviders(),
26+
const PreferFinalProviders(),
2727
];
2828

2929
@override
@@ -36,7 +36,7 @@ class _RiverpodLint extends PluginBase {
3636
///
3737
/// For emitting lints on non-Dart files, subclass [LintRule].
3838
class PreferFinalProviders extends DartLintRule {
39-
PreferFinalProviders() : super(code: _code);
39+
const PreferFinalProviders() : super(code: _code);
4040

4141
/// Metadata about the lint define. This is the code which will show-up in the IDE,
4242
/// and its description..
@@ -47,7 +47,7 @@ class PreferFinalProviders extends DartLintRule {
4747

4848
/// The core logic for our custom lint rule.
4949
/// In our case, it will search over all variables defined in a Dart file and
50-
/// search for the ones that implement a specific type (see [__providerBaseChecker]).
50+
/// search for the ones that implement a specific type (see [_providerBaseChecker]).
5151
@override
5252
void run(
5353
// This object contains metadata about the analyzed file
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# include: ../analysis_options.yaml
1+
include: ../analysis_options.yaml
22

3-
# linter:
4-
# rules:
5-
# public_member_api_docs: false
6-
# avoid_print: false
3+
linter:
4+
rules:
5+
public_member_api_docs: false
6+
avoid_print: false

packages/custom_lint_builder/example/example_lint/lib/custom_lint_builder_example_lint.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ PluginBase createPlugin() => _RiverpodLint();
2323
class _RiverpodLint extends PluginBase {
2424
@override
2525
List<LintRule> getLintRules(CustomLintConfigs configs) => [
26-
PreferFinalProviders(),
26+
const PreferFinalProviders(),
2727
];
2828

2929
@override
@@ -36,7 +36,7 @@ class _RiverpodLint extends PluginBase {
3636
///
3737
/// For emitting lints on non-Dart files, subclass [LintRule].
3838
class PreferFinalProviders extends DartLintRule {
39-
PreferFinalProviders() : super(code: _code);
39+
const PreferFinalProviders() : super(code: _code);
4040

4141
/// Metadata about the lint define. This is the code which will show-up in the IDE,
4242
/// and its description..

0 commit comments

Comments
 (0)