diff --git a/analysis_options.yaml b/analysis_options.yaml index a5744c1..12e713a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +include: package:lints/recommended.yaml # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/lib/lexer.dart b/lib/lexer.dart index 8d13c0e..4fd762f 100644 --- a/lib/lexer.dart +++ b/lib/lexer.dart @@ -1,3 +1,5 @@ +// ignore_for_file: constant_identifier_names + part of 'streaming_json_parser.dart'; const String JSON_COMMA = ','; @@ -15,7 +17,7 @@ const List JSON_SYNTAX = [ JSON_LEFTBRACKET, JSON_RIGHTBRACKET, JSON_LEFTBRACE, - JSON_RIGHTBRACE + JSON_RIGHTBRACE, ]; const int FALSE_LEN = 'false'.length; @@ -35,7 +37,7 @@ Map lexString(String string) { if (c == JSON_QUOTE) { return { 'value': jsonString, - 'rest': string.substring(jsonString.length + 1) + 'rest': string.substring(jsonString.length + 1), }; } else { jsonString += c; diff --git a/lib/parser.dart b/lib/parser.dart index 1b46c3c..4d5894e 100644 --- a/lib/parser.dart +++ b/lib/parser.dart @@ -1,3 +1,5 @@ +// ignore_for_file: prefer_typing_uninitialized_variables + part of 'streaming_json_parser.dart'; List parseArray(List tokens) { @@ -56,7 +58,8 @@ Map parseObject(List tokens) { if (tokens[0] != JSON_COLON) { throw Exception( - 'Expected colon after key in object, got: ${tokens[0]}'); + 'Expected colon after key in object, got: ${tokens[0]}', + ); } var result = parseTokens(tokens.sublist(1)); diff --git a/lib/streaming_json_parser.dart b/lib/streaming_json_parser.dart index 9e998b3..e3435f0 100644 --- a/lib/streaming_json_parser.dart +++ b/lib/streaming_json_parser.dart @@ -1,3 +1,4 @@ +// ignore: unnecessary_library_name library streaming_json_parser; part 'lexer.dart'; diff --git a/pubspec.yaml b/pubspec.yaml index 345d39c..1f5c386 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,50 +5,7 @@ repository: https://github.com/Mkohm/streaming_json_parser environment: sdk: ">=3.3.4 <4.0.0" - flutter: ">=1.17.0" - -dependencies: - flutter: - sdk: flutter dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^4.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/to/asset-from-package - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # To add custom fonts to your package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/to/font-from-package + lints: ^3.0.0 + test: ^1.31.0 diff --git a/test/streaming_json_parser_test.dart b/test/streaming_json_parser_test.dart index 84840bd..73b687f 100644 --- a/test/streaming_json_parser_test.dart +++ b/test/streaming_json_parser_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'package:streaming_json_parser/streaming_json_parser.dart'; void main() {