diff --git a/analysis_options.yaml b/analysis_options.yaml index 06d7ee1c..7749c861 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -32,5 +32,6 @@ linter: - prefer_single_quotes - sort_constructors_first - sort_unnamed_constructors_first + - unnecessary_lambdas - unnecessary_parenthesis - unnecessary_string_interpolations diff --git a/lib/src/models/rules/insert.dart b/lib/src/models/rules/insert.dart index 9c10d422..f50be23f 100644 --- a/lib/src/models/rules/insert.dart +++ b/lib/src/models/rules/insert.dart @@ -189,7 +189,7 @@ class AutoExitBlockRule extends InsertRule { // therefore we can exit this block. final attributes = cur.attributes ?? {}; final k = attributes.keys - .firstWhere((k) => Attribute.blockKeysExceptHeader.contains(k)); + .firstWhere(Attribute.blockKeysExceptHeader.contains); attributes[k] = null; // retain(1) should be '\n', set it with no attribute return Delta()..retain(index + (len ?? 0))..retain(1, attributes);