[dartdevc] Apply all lints from pkg:pedantic
Ignore slash_for_doc_comments in lib/src/js_ast to avoid additional diffs when
potentially un-forking in the future.
Fixes: #37218
Change-Id: If5c5bacf2d77fbae432217ba6031a6a8fa5dfcd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106580
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
diff --git a/pkg/dev_compiler/analysis_options.yaml b/pkg/dev_compiler/analysis_options.yaml
index 249dc5d..aa58938 100644
--- a/pkg/dev_compiler/analysis_options.yaml
+++ b/pkg/dev_compiler/analysis_options.yaml
@@ -1,3 +1,5 @@
+include: package:pedantic/analysis_options.1.7.0.yaml
+
analyzer:
strong-mode:
implicit-casts: false
@@ -14,27 +16,3 @@
linter:
rules:
- annotate_overrides
- - avoid_empty_else
- - avoid_init_to_null
- - avoid_relative_lib_imports
- - avoid_return_types_on_setters
- - avoid_shadowing_type_parameters
- - avoid_types_as_parameter_names
- - curly_braces_in_flow_control_structures
- - empty_catches
- - empty_constructor_bodies
- - library_names
- - library_prefixes
- - no_duplicate_case_values
- - null_closures
- - prefer_contains
- - prefer_equal_for_default_values
- - prefer_is_empty
- - prefer_is_not_empty
- - recursive_getters
- - type_init_formals
- - unawaited_futures
- - unnecessary_null_in_if_null_operators
- - unrelated_type_equality_checks
- - use_rethrow_when_possible
- - valid_regexps
diff --git a/pkg/dev_compiler/lib/src/js_ast/builder.dart b/pkg/dev_compiler/lib/src/js_ast/builder.dart
index 2d0dd51..6217e98 100644
--- a/pkg/dev_compiler/lib/src/js_ast/builder.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/builder.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// ignore_for_file: slash_for_doc_comments
+
// Utilities for building JS ASTs at runtime. Contains a builder class
// and a parser that parses part of the language.
diff --git a/pkg/dev_compiler/lib/src/js_ast/nodes.dart b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
index 36d2368..219e99a 100644
--- a/pkg/dev_compiler/lib/src/js_ast/nodes.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// ignore_for_file: slash_for_doc_comments
+
part of js_ast;
abstract class NodeVisitor<T> {
diff --git a/pkg/dev_compiler/lib/src/js_ast/printer.dart b/pkg/dev_compiler/lib/src/js_ast/printer.dart
index f4a9717..5d8c495 100644
--- a/pkg/dev_compiler/lib/src/js_ast/printer.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/printer.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// ignore_for_file: slash_for_doc_comments
+
part of js_ast;
class JavaScriptPrintingOptions {
diff --git a/pkg/dev_compiler/lib/src/js_ast/template.dart b/pkg/dev_compiler/lib/src/js_ast/template.dart
index 6363cd6..4fe7042 100644
--- a/pkg/dev_compiler/lib/src/js_ast/template.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/template.dart
@@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// ignore_for_file: slash_for_doc_comments
+
part of js_ast;
class TemplateManager {
diff --git a/pkg/dev_compiler/pubspec.yaml b/pkg/dev_compiler/pubspec.yaml
index 7ca09fb..ef14bc8 100644
--- a/pkg/dev_compiler/pubspec.yaml
+++ b/pkg/dev_compiler/pubspec.yaml
@@ -15,6 +15,7 @@
dev_dependencies:
sourcemap_testing:
path: ../sourcemap_testing
+ pedantic: ^1.7.0
test: any
testing:
path: ../testing