From 59c6376a497a382e25ad3721215a4715dd7baa28 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 30 Sep 2024 10:37:51 -0700 Subject: [PATCH] Ignore lint about deprecated pkg:analyzer API (#1447) Can't move to the new API until Dart 3.6 is stable --- json_serializable/lib/src/field_helpers.dart | 4 ++++ .../lib/src/type_helpers/json_converter_helper.dart | 1 + json_serializable/lib/src/utils.dart | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/json_serializable/lib/src/field_helpers.dart b/json_serializable/lib/src/field_helpers.dart index f0b7828e9..b315a1401 100644 --- a/json_serializable/lib/src/field_helpers.dart +++ b/json_serializable/lib/src/field_helpers.dart @@ -2,6 +2,10 @@ // 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. +// TODO: Waiting until Dart 3.6 so we can pin a stable Dart SDK compatible w/ latest +// analyzer +// ignore_for_file: deprecated_member_use + import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/src/dart/element/inheritance_manager3.dart' // ignore: implementation_imports show diff --git a/json_serializable/lib/src/type_helpers/json_converter_helper.dart b/json_serializable/lib/src/type_helpers/json_converter_helper.dart index ce78f19d1..4f1192703 100644 --- a/json_serializable/lib/src/type_helpers/json_converter_helper.dart +++ b/json_serializable/lib/src/type_helpers/json_converter_helper.dart @@ -214,6 +214,7 @@ _JsonConvertData? _typeConverterFrom( final annotationElement = match.elementAnnotation?.element; if (annotationElement is PropertyAccessorElement) { + // ignore: deprecated_member_use final enclosing = annotationElement.enclosingElement; var accessString = annotationElement.name; diff --git a/json_serializable/lib/src/utils.dart b/json_serializable/lib/src/utils.dart index 782eeb53d..84ef4695b 100644 --- a/json_serializable/lib/src/utils.dart +++ b/json_serializable/lib/src/utils.dart @@ -2,6 +2,10 @@ // 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. +// TODO: Waiting until Dart 3.6 so we can pin a stable Dart SDK compatible w/ latest +// analyzer +// ignore_for_file: deprecated_member_use + import 'package:analyzer/dart/constant/value.dart'; import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/type.dart';