[CQ] cleanup `unnecessary_ignore`s (#8825)

* [CQ] cleanup `unnecessary_ignore`s

* (revert)
diff --git a/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart b/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart
index 4be7bf8..2125b31 100644
--- a/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart
+++ b/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
 
-// ignore_for_file: invalid_use_of_visible_for_testing_member, valid use for benchmark tests.
-
 import 'dart:async';
 
 import 'package:devtools_app/devtools_app.dart';
diff --git a/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart b/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart
index 0269f4a..43baef7 100644
--- a/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart
+++ b/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart
@@ -5,8 +5,6 @@
 // Do not delete these arguments. They are parsed by test runner.
 // test-argument:appPath="test/test_infra/fixtures/memory_app"
 
-// ignore_for_file: avoid_print
-
 import 'package:devtools_test/helpers.dart';
 import 'package:devtools_test/integration_test.dart';
 import 'package:flutter_test/flutter_test.dart';
diff --git a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart
index cc0d0b5..ef586a2 100644
--- a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart
+++ b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
 
-// ignore_for_file: avoid_print
-
 import 'dart:async';
 import 'dart:convert';
 import 'dart:io';
diff --git a/packages/devtools_app/integration_test/test_infra/run/run_test.dart b/packages/devtools_app/integration_test/test_infra/run/run_test.dart
index 5d4689c..ec1f6b9 100644
--- a/packages/devtools_app/integration_test/test_infra/run/run_test.dart
+++ b/packages/devtools_app/integration_test/test_infra/run/run_test.dart
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
 
-// ignore_for_file: avoid_print
-
 import 'dart:async';
 import 'dart:convert';
 
diff --git a/packages/devtools_app/lib/src/screens/debugger/variables.dart b/packages/devtools_app/lib/src/screens/debugger/variables.dart
index 6e59acb..7460bad 100644
--- a/packages/devtools_app/lib/src/screens/debugger/variables.dart
+++ b/packages/devtools_app/lib/src/screens/debugger/variables.dart
@@ -4,7 +4,6 @@
 
 // TODO(https://github.com/flutter/devtools/issues/4717): migrate away from
 // deprecated members.
-// ignore_for_file: deprecated_member_use
 
 import 'dart:async';
 
diff --git a/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart b/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart
index 870c4bc..bb3b2ce 100644
--- a/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart
+++ b/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart
@@ -62,8 +62,6 @@
               _firstLiveFrameId == null) {
             _firstLiveFrameId =
                 FlutterFrame.fromJson(event.extensionData!.data).id;
-            // See https://github.com/dart-lang/linter/issues/3801
-            // ignore: discarded_futures
             unawaited(_firstFrameEventSubscription!.cancel());
             _firstFrameEventSubscription = null;
           }
@@ -120,8 +118,6 @@
   @override
   void dispose() {
     unawaited(showMenuStreamController.close());
-    // See https://github.com/dart-lang/linter/issues/3801
-    // ignore: discarded_futures
     unawaited(_firstFrameEventSubscription?.cancel());
     super.dispose();
   }
diff --git a/packages/devtools_app/lib/src/shared/charts/chart_controller.dart b/packages/devtools_app/lib/src/shared/charts/chart_controller.dart
index 3a4c4af..d03ddb2 100644
--- a/packages/devtools_app/lib/src/shared/charts/chart_controller.dart
+++ b/packages/devtools_app/lib/src/shared/charts/chart_controller.dart
@@ -220,10 +220,9 @@
       // Greater or equal to range we're zooming in on?
       if (lastDT.difference(firstDT).inMinutes >= duration.inMinutes) {
         // Grab the duration in minutes passed in.
-        final startOfLastNMinutes =
-        // We need this cast to be able to return null if nothing is found.
-        // ignore: unnecessary_cast
-        timestamps.reversed.firstWhereOrNull((timestamp) {
+        final startOfLastNMinutes = timestamps.reversed.firstWhereOrNull((
+          timestamp,
+        ) {
           final currentDT = DateTime.fromMillisecondsSinceEpoch(timestamp);
           final diff = lastDT.difference(currentDT);
           if (diff.inMinutes >= duration.inMinutes) {
diff --git a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart
index 01e5e2c..2664423 100644
--- a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart
+++ b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart
@@ -16,9 +16,6 @@
       _log.shout('[${error.runtimeType}] ${errorLines.first}');
       _log.shout(errorLines.skip(1).join('\n'));
     }
-    // TODO(srawlins): This is an illegal return value (`null`) for all `T`.
-    // This function must return an actual `T`.
-    // ignore: null_argument_to_non_null_type
     return Future<T>.value();
   });
 }
diff --git a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart
index 1f90746..66cc1e6 100644
--- a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart
+++ b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart
@@ -17,9 +17,6 @@
       console.log(errorLines.skip(1).join('\n').toJS);
       console.groupEnd();
     }
-    // TODO(srawlins): This is an illegal return value (`null`) for all `T`.
-    // This function must return an actual `T`.
-    // ignore: null_argument_to_non_null_type
     return Future<T>.value();
   });
 }
diff --git a/packages/devtools_app/lib/src/shared/framework/screen.dart b/packages/devtools_app/lib/src/shared/framework/screen.dart
index 08aaebd..bdab02f 100644
--- a/packages/devtools_app/lib/src/shared/framework/screen.dart
+++ b/packages/devtools_app/lib/src/shared/framework/screen.dart
@@ -56,10 +56,8 @@
     title: 'Memory',
     iconAsset: 'icons/app_bar/memory.png',
     requiresDartVm: true,
-    // ignore: avoid_redundant_argument_values, false positive
     requiresConnection: !FeatureFlags.memoryDisconnectExperience,
     tutorialVideoTimestamp: '?t=420',
-    // ignore: avoid_redundant_argument_values, false positive
     worksWithOfflineData: FeatureFlags.memoryDisconnectExperience,
   ),
   debugger(
diff --git a/packages/devtools_app/lib/src/shared/http/_http_cookies.dart b/packages/devtools_app/lib/src/shared/http/_http_cookies.dart
index ff3922c..ca49ed8 100644
--- a/packages/devtools_app/lib/src/shared/http/_http_cookies.dart
+++ b/packages/devtools_app/lib/src/shared/http/_http_cookies.dart
@@ -6,21 +6,14 @@
 // https://github.com/dart-lang/sdk/blob/main/sdk/lib/_http/http_headers.dart#L965
 // TODO(mossman): Is there a way to use dart:io directly?
 
-// ignore_for_file: annotate_overrides
-// ignore_for_file: empty_statements
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: prefer_const_declarations
 // ignore_for_file: prefer_contains
 // ignore_for_file: prefer_final_locals
 // ignore_for_file: prefer_is_empty
 // ignore_for_file: prefer_single_quotes
-// ignore_for_file: slash_for_doc_comments
 // ignore_for_file: sort_constructors_first
 // ignore_for_file: unnecessary_const
 // ignore_for_file: unnecessary_new
-// ignore_for_file: unused_catch_clause
 // ignore_for_file: unused_element
-// ignore_for_file: unused_local_variable
 
 part of 'http.dart';
 
diff --git a/packages/devtools_app/lib/src/shared/http/_http_date.dart b/packages/devtools_app/lib/src/shared/http/_http_date.dart
index e5e3cb3..863eff9 100644
--- a/packages/devtools_app/lib/src/shared/http/_http_date.dart
+++ b/packages/devtools_app/lib/src/shared/http/_http_date.dart
@@ -5,16 +5,11 @@
 // This file was pulled from dart:io.
 
 // ignore_for_file: empty_statements
-// ignore_for_file: non_constant_identifier_names
-// ignore_for_file: prefer_const_declarations
 // ignore_for_file: prefer_final_locals
 // ignore_for_file: prefer_is_empty
 // ignore_for_file: prefer_single_quotes
-// ignore_for_file: slash_for_doc_comments
 // ignore_for_file: unnecessary_const
 // ignore_for_file: unnecessary_new
-// ignore_for_file: unused_catch_clause
-// ignore_for_file: unused_local_variable
 // ignore_for_file: avoid-throw-in-catch-block
 
 part of 'http.dart';
diff --git a/packages/devtools_app/lib/src/shared/ui/hover.dart b/packages/devtools_app/lib/src/shared/ui/hover.dart
index f51078a..7ca42af 100644
--- a/packages/devtools_app/lib/src/shared/ui/hover.dart
+++ b/packages/devtools_app/lib/src/shared/ui/hover.dart
@@ -448,7 +448,6 @@
         // If we get no data back, then don't show a hover card.
         if (data == null) return;
         // Otherwise, show a hover card immediately.
-        // ignore: use_build_context_synchronously, requires investigation
         return _setHoverCardFromData(
           data,
           // ignore: use_build_context_synchronously, requires investigation
@@ -459,7 +458,6 @@
     }
     // The data on the card is fetched asynchronously, so show a spinner
     // while we wait for it.
-    // ignore: use_build_context_synchronously, requires investigation
     spinnerHoverCard = HoverCard.fromHoverEvent(
       // ignore: use_build_context_synchronously, requires investigation
       context: context,
@@ -485,7 +483,6 @@
       return;
     }
 
-    // ignore: use_build_context_synchronously, requires investigation
     return _setHoverCardFromData(
       hoverCardData,
       // ignore: use_build_context_synchronously, requires investigation
diff --git a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart
index c17b49b..cd77468 100644
--- a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart
+++ b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart
@@ -9,8 +9,6 @@
 // (the test verifies that breakpoints are hit at specific lines).
 
 import 'package:flutter/material.dart';
-// Unused imports are useful for testing autocomplete.
-// ignore_for_file: unused_import
 import 'src/autocomplete.dart';
 import 'src/other_classes.dart';
 
diff --git a/packages/devtools_app/test/test_infra/flutter_test_environment.dart b/packages/devtools_app/test/test_infra/flutter_test_environment.dart
index 622786e..54da10a 100644
--- a/packages/devtools_app/test/test_infra/flutter_test_environment.dart
+++ b/packages/devtools_app/test/test_infra/flutter_test_environment.dart
@@ -161,7 +161,6 @@
         setGlobal(DTDManager, DTDManager());
 
         // Clear out VM service calls from the test driver.
-        // ignore: invalid_use_of_visible_for_testing_member
         _service.clearVmServiceCalls();
 
         await serviceConnection.serviceManager.vmServiceOpened(
diff --git a/packages/devtools_app_shared/lib/src/utils/list.dart b/packages/devtools_app_shared/lib/src/utils/list.dart
index 22775e5..d4dc274 100644
--- a/packages/devtools_app_shared/lib/src/utils/list.dart
+++ b/packages/devtools_app_shared/lib/src/utils/list.dart
@@ -27,7 +27,6 @@
 
   @override
   // This override is needed to change visibility of the method.
-  // ignore: unnecessary_overrides
   void notifyListeners() {
     super.notifyListeners();
   }
diff --git a/packages/devtools_extensions/lib/src/template/extension_manager.dart b/packages/devtools_extensions/lib/src/template/extension_manager.dart
index 446c68a..89ea1ea 100644
--- a/packages/devtools_extensions/lib/src/template/extension_manager.dart
+++ b/packages/devtools_extensions/lib/src/template/extension_manager.dart
@@ -44,7 +44,6 @@
   /// removed in [dispose].
   EventListener? _handleMessageListener;
 
-  // ignore: unused_element, false positive due to part files
   Future<void> _init() async {
     window.addEventListener(
       'message',
@@ -76,7 +75,6 @@
     }
   }
 
-  // ignore: unused_element, false positive due to part files
   void _dispose() {
     _registeredEventHandlers.clear();
     window.removeEventListener('message', _handleMessageListener);
diff --git a/packages/devtools_shared/lib/src/server/server_api.dart b/packages/devtools_shared/lib/src/server/server_api.dart
index 6eb1f43..8a39deb 100644
--- a/packages/devtools_shared/lib/src/server/server_api.dart
+++ b/packages/devtools_shared/lib/src/server/server_api.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
 
-// ignore_for_file: avoid_classes_with_only_static_members, avoid_print
+// ignore_for_file: avoid_print
 
 import 'dart:async';
 import 'dart:convert';
diff --git a/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart b/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart
index 9d20bb4..3a5f602 100644
--- a/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart
+++ b/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart
@@ -25,7 +25,6 @@
       // the web-specific implementation of the Flutter Engine, at
       // `lib/web_ui/lib/src/engine/window.dart` in the Flutter engine
       // repository.
-      // ignore: avoid_dynamic_calls
       .resetHistory();
 }
 
diff --git a/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart b/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart
index 3a6d359..5be3b19 100644
--- a/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart
+++ b/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart
@@ -12,7 +12,6 @@
 import 'package:flutter/foundation.dart';
 import 'package:mockito/mockito.dart';
 
-// ignore: subtype_of_sealed_class, fake for testing.
 /// Fake that simplifies writing UI tests that depend on the
 /// ServiceExtensionManager.
 // TODO(jacobr): refactor ServiceExtensionManager so this fake can reuse more
diff --git a/packages/devtools_test/lib/src/mocks/mocks.dart b/packages/devtools_test/lib/src/mocks/mocks.dart
index 0b50527..8247239 100644
--- a/packages/devtools_test/lib/src/mocks/mocks.dart
+++ b/packages/devtools_test/lib/src/mocks/mocks.dart
@@ -214,7 +214,6 @@
   when(connectedApp.connectedAppInitialized).thenReturn(true);
 }
 
-// ignore: prefer_single_quotes, false positive.
 final mockGrammar = Grammar.fromJson(
   jsonDecode('''
 {