Update pedantic to 1.11.0 (dart-lang/markdown#361)
diff --git a/pkgs/markdown/CHANGELOG.md b/pkgs/markdown/CHANGELOG.md index a8d494f..ba7ee5b 100644 --- a/pkgs/markdown/CHANGELOG.md +++ b/pkgs/markdown/CHANGELOG.md
@@ -1,3 +1,7 @@ +## 4.0.1-dev + +* Enforce lint rules found in pedantic 1.11.0. + ## 4.0.0 * Stable null safety release.
diff --git a/pkgs/markdown/analysis_options.yaml b/pkgs/markdown/analysis_options.yaml index 5b6d719..755e1a2 100644 --- a/pkgs/markdown/analysis_options.yaml +++ b/pkgs/markdown/analysis_options.yaml
@@ -1,4 +1,4 @@ -include: package:pedantic/analysis_options.1.9.0.yaml +include: package:pedantic/analysis_options.1.11.0.yaml analyzer: language: strict-inference: true @@ -10,11 +10,11 @@ unused_element: error unused_import: error unused_local_variable: error - # TODO(srawlins): Re-enable this once "unused" parameters are exempted. - inference_failure_on_untyped_parameter: ignore + # The example app explicitly takes a String of user-generated HTML and + # inserts it straight into a <div> using innerHtml. + unsafe_html: ignore linter: rules: - - await_only_futures - camel_case_types # https://github.com/dart-lang/linter/issues/574 #- comment_references @@ -31,4 +31,3 @@ - package_api_docs - test_types_in_equals - throw_in_finally - - unnecessary_brace_in_string_interps
diff --git a/pkgs/markdown/example/highlight.dart b/pkgs/markdown/example/highlight.dart index b46b8bb..29c699f 100644 --- a/pkgs/markdown/example/highlight.dart +++ b/pkgs/markdown/example/highlight.dart
@@ -8,4 +8,4 @@ import 'package:js/js.dart'; @JS() -external void highlightBlock(block); +external void highlightBlock(Object block);
diff --git a/pkgs/markdown/lib/src/emojis.dart b/pkgs/markdown/lib/src/emojis.dart index faa3287..36ca552 100644 --- a/pkgs/markdown/lib/src/emojis.dart +++ b/pkgs/markdown/lib/src/emojis.dart
@@ -1,8 +1,8 @@ // GENERATED FILE. DO NOT EDIT. // // This file was generated from emojilib's emoji data file: -// https://github.com/muan/emojilib/raw/master/emojis.json -// at 2021-01-06 07:39:39.063511 by the script, tool/update_emojis.dart. +// https://raw.githubusercontent.com/muan/emojilib/v2.4.0/emojis.json +// at 2021-03-03 14:53:46.512143 by the script, tool/update_emojis.dart. const emojis = <String, String>{ 'grinning': '😀',
diff --git a/pkgs/markdown/lib/src/version.dart b/pkgs/markdown/lib/src/version.dart index 66803ec..ff27850 100644 --- a/pkgs/markdown/lib/src/version.dart +++ b/pkgs/markdown/lib/src/version.dart
@@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '4.0.0'; +const packageVersion = '4.0.1-dev';
diff --git a/pkgs/markdown/pubspec.yaml b/pkgs/markdown/pubspec.yaml index 2832eb5..d81272a 100644 --- a/pkgs/markdown/pubspec.yaml +++ b/pkgs/markdown/pubspec.yaml
@@ -1,5 +1,5 @@ name: markdown -version: 4.0.0 +version: 4.0.1-dev description: A portable Markdown library written in Dart that can parse Markdown into HTML. @@ -25,6 +25,6 @@ io: ^0.3.2+1 js: ^0.6.3 path: ^1.8.0 - pedantic: ^1.10.0 + pedantic: ^1.11.0 test: ^1.16.0 yaml: ^3.0.0
diff --git a/pkgs/markdown/tool/update_blns.dart b/pkgs/markdown/tool/update_blns.dart index 3392712..2913446 100644 --- a/pkgs/markdown/tool/update_blns.dart +++ b/pkgs/markdown/tool/update_blns.dart
@@ -6,7 +6,7 @@ 'https://github.com/minimaxir/big-list-of-naughty-strings/raw/master/blns.json'; final _blnsFilePath = 'test/blns.dart'; -Future<Null> main() async { +Future<void> main() async { var client = HttpClient(); List<String> json; try { @@ -37,5 +37,5 @@ blnsContent.writeln(" '$escaped',"); } blnsContent.writeln('];'); - File(_blnsFilePath)..writeAsStringSync(blnsContent.toString()); + File(_blnsFilePath).writeAsStringSync(blnsContent.toString()); }
diff --git a/pkgs/markdown/tool/update_emojis.dart b/pkgs/markdown/tool/update_emojis.dart index 1835719..ebdf803 100644 --- a/pkgs/markdown/tool/update_emojis.dart +++ b/pkgs/markdown/tool/update_emojis.dart
@@ -2,17 +2,21 @@ import 'dart:convert'; import 'dart:io'; +// TODO(srawlins): Switch to https://github.com/muan/unicode-emoji-json. This +// is definitely a breaking change; the emoji names are not necessarily the +// same. final _emojisJsonRawUrl = - 'https://github.com/muan/emojilib/raw/master/emojis.json'; + 'https://raw.githubusercontent.com/muan/emojilib/v2.4.0/emojis.json'; final _emojisFilePath = 'lib/src/emojis.dart'; -Future<Null> main() async { +Future<void> main() async { var client = HttpClient(); var request = await client.getUrl(Uri.parse(_emojisJsonRawUrl)); var response = await request.close(); var json = jsonDecode( await response.cast<List<int>>().transform(utf8.decoder).join('')) - .map((alias, info) => MapEntry(alias, info.cast<String, dynamic>())) + .map((String alias, dynamic info) => + MapEntry(alias, info.cast<String, dynamic>())) .cast<String, Map<String, dynamic>>(); var emojisContent = StringBuffer(''' // GENERATED FILE. DO NOT EDIT. @@ -34,7 +38,7 @@ } }); emojisContent.writeln('};'); - File(_emojisFilePath)..writeAsStringSync(emojisContent.toString()); + File(_emojisFilePath).writeAsStringSync(emojisContent.toString()); print('Wrote data to $_emojisFilePath for $emojiCount emojis, ' 'ignoring ${ignored.length}: ${ignored.join(', ')}.'); exit(0);