Skip to content

Commit

Permalink
Update to latest lints and fix problems
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Jan 22, 2025
1 parent 63894bb commit 91edd9c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion _analysis_config/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ environment:
sdk: ^3.1.0

dependencies:
lints: ^4.0.0
lints: ^5.0.0
2 changes: 1 addition & 1 deletion dwds/lib/src/debugging/inspector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ class AppInspector implements AppInspectorInterface {
return _instanceHelper.metadataHelper.isNativeJsError(instanceRef.classRef);
}

/// Request and cache <ScriptRef>s for all the scripts in the application.
/// Request and cache `<ScriptRef>`s for all the scripts in the application.
///
/// This populates [_scriptRefsById], [_scriptIdToLibraryId],
/// [_libraryIdToScriptRefs] and [_serverPathToScriptRef].
Expand Down
4 changes: 2 additions & 2 deletions dwds/lib/src/debugging/metadata/class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ class ClassMetaData {

/// Type name for Type instances.
///
/// For example, 'int', 'String', 'MyClass', 'List<int>'.
/// For example, `int`, `String`, `MyClass`, `List<int>`.
final String? typeName;

/// The length of the object, if applicable.
final int? length;

/// The dart type name for the object.
///
/// For example, 'int', 'List<String>', 'Null'
/// For example, `int`, `List<String>`, `Null`
String? get dartName => classRef.name;

/// Class ref for the class metadata.
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/services/expression_evaluator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ExpressionEvaluator {
/// Find module path from the XHR call network error message received from chrome.
///
/// Example:
/// NetworkError: Failed to load 'http://<hostname>.com/path/to/module.js?<cache_busting_token>'
/// NetworkError: Failed to load `http://<hostname>.com/path/to/module.js?<cache_busting_token>`
static final _loadModuleErrorRegex =
RegExp(r".*Failed to load '.*\.com/(.*\.js).*");

Expand Down
2 changes: 1 addition & 1 deletion dwds/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dev_dependencies:
frontend_server_common:
path: ../frontend_server_common
js: '>=0.6.4 <0.8.0'
lints: ^4.0.0
lints: ^5.0.0
pubspec_parse: ^1.2.0
puppeteer: ^3.1.1
stream_channel: ^2.1.2
Expand Down
3 changes: 1 addition & 2 deletions dwds/test/fixtures/project.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import 'dart:io';

import 'package:path/path.dart' as p;

import 'package:test_common/utilities.dart';

enum IndexBaseMode { noBase, base }
Expand Down Expand Up @@ -48,7 +47,7 @@ class TestProject {
);

/// The URI for the package_config.json is located in:
/// <project directory>/.dart_tool/package_config
/// `<project directory>/.dart_tool/package_config`
Uri get packageConfigFile => p.toUri(
p.join(
absolutePackageDirectory,
Expand Down
26 changes: 14 additions & 12 deletions dwds/web/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,20 @@ Future<void>? main() {

if (dwdsEnableDevToolsLaunch) {
window.onKeyDown.listen((Event e) {
if (e is KeyboardEvent &&
const [
'd',
'D',
'∂', // alt-d output on Mac
'Î', // shift-alt-D output on Mac
].contains(e.key) &&
e.altKey &&
!e.ctrlKey &&
!e.metaKey) {
e.preventDefault();
launchDevToolsJs.callAsFunction();
if (e.isA<KeyboardEvent>()) {
final event = e as KeyboardEvent;
if (const [
'd',
'D',
'∂', // alt-d output on Mac
'Î', // shift-alt-D output on Mac
].contains(event.key) &&
event.altKey &&
!event.ctrlKey &&
!event.metaKey) {
event.preventDefault();
launchDevToolsJs.callAsFunction();
}
}
});
}
Expand Down

0 comments on commit 91edd9c

Please sign in to comment.