diff --git a/analysis_options.yaml b/analysis_options.yaml index 1a4774f..bc3fd4a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -32,14 +32,19 @@ linter: prefer_final_locals: true use_super_parameters: true use_key_in_widget_constructors: false # waiting for auto fix: https://github.com/dart-lang/sdk/issues/50056 - avoid_print: false # TODO: + + # TODO: + avoid_print: false + use_build_context_synchronously: false + non_constant_identifier_names: false analyzer: errors: todo: ignore fixme: ignore - exclude: - - "**/*.gql.dart" - - "**/*.g.dart" + invalid_annotation_target: ignore # https://github.com/rrousselGit/freezed#disabling-invalid_annotation_target-warning-and-warning-in-generates-files + # TODO: + unused_element: false + override_on_non_overriding_member: false # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/packages/github_trending/analysis_options.yaml b/packages/github_trending/analysis_options.yaml deleted file mode 100644 index 1b5ba2a..0000000 --- a/packages/github_trending/analysis_options.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# # Defines a default set of lint rules enforced for -# # projects at Google. For details and rationale, -# # see https://github.com/dart-lang/pedantic#enabled-lints. -# include: package:pedantic/analysis_options.yaml - -# # For lint rules and documentation, see http://dart-lang.github.io/linter/lints. -# # Uncomment to specify additional rules. -# # linter: -# # rules: -# # - camel_case_types - -# analyzer: -# # exclude: -# # - path/to/excluded/files/** diff --git a/packages/github_trending/example/github_trending_example.dart b/packages/github_trending/example/github_trending_example.dart index c513597..78e806d 100644 --- a/packages/github_trending/example/github_trending_example.dart +++ b/packages/github_trending/example/github_trending_example.dart @@ -4,15 +4,15 @@ void main() async { final trending = GithubTrending(); // get trending repositories - var repos = await trending.getTrendingRepositories(); + final repos = await trending.getTrendingRepositories(); print(repos[0].name); // specify time period - var weeklyRepos = await trending.getTrendingRepositories(since: 'weekly'); + final weeklyRepos = await trending.getTrendingRepositories(since: 'weekly'); print(weeklyRepos[0].name); // specify language - var dartRepos = await trending.getTrendingRepositories(language: 'dart'); + final dartRepos = await trending.getTrendingRepositories(language: 'dart'); print(dartRepos[0].language); // Dart print(dartRepos[0].languageColor); // #00B4AB } diff --git a/packages/github_trending/lib/src/model.dart b/packages/github_trending/lib/src/model.dart index 41dd2b9..2bddc92 100644 --- a/packages/github_trending/lib/src/model.dart +++ b/packages/github_trending/lib/src/model.dart @@ -4,9 +4,9 @@ part 'model.g.dart'; @JsonSerializable() class GithubTrendingRepository { + GithubTrendingRepository(); factory GithubTrendingRepository.fromJson(Map json) => _$GithubTrendingRepositoryFromJson(json); - GithubTrendingRepository(); String? author; String? name; String? avatar; @@ -22,9 +22,9 @@ class GithubTrendingRepository { @JsonSerializable() class GithubTrendingRepositoryBuiltBy { + GithubTrendingRepositoryBuiltBy(); factory GithubTrendingRepositoryBuiltBy.fromJson(Map json) => _$GithubTrendingRepositoryBuiltByFromJson(json); - GithubTrendingRepositoryBuiltBy(); String? href; String? avatar; String? username; @@ -32,9 +32,9 @@ class GithubTrendingRepositoryBuiltBy { @JsonSerializable() class GithubTrendingDeveloper { + GithubTrendingDeveloper(); factory GithubTrendingDeveloper.fromJson(Map json) => _$GithubTrendingDeveloperFromJson(json); - GithubTrendingDeveloper(); String? username; String? name; String? type; @@ -45,10 +45,10 @@ class GithubTrendingDeveloper { @JsonSerializable() class GithubTrendingDeveloperRepository { + GithubTrendingDeveloperRepository(); factory GithubTrendingDeveloperRepository.fromJson( Map json) => _$GithubTrendingDeveloperRepositoryFromJson(json); - GithubTrendingDeveloperRepository(); String? name; String? description; String? url;