From 5bfdf5eddaa352ced93a34ed47eb52ffc648ce6f Mon Sep 17 00:00:00 2001 From: anfeichtinger <anfeichtingers@gmail.com> Date: Sat, 19 Jun 2021 16:50:47 +0200 Subject: [PATCH] Replace deprecated pedantic package with lints package --- README.md | 8 ++++---- analysis_options.yaml | 2 +- assets/translations/en.json | 4 ++-- lib/ui/screens/second_screen.dart | 4 ++-- pubspec.lock | 14 +++++++------- pubspec.yaml | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 22f3440a..739162ff 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Flutter Production Boilerplate -## A flutter project containing bloc, pedantic, hive, easy_translations and more! +## A flutter project containing bloc, lints, hive, easy_translations and more! This repository is the starting point for my personal projects. If you have any suggestions or improvements feel free to let me know. The project strives to implement best practices recommended by Google and other developers. These best practices include but are not limited to: - Using BLOC & Cubit for state management. -- Using Pedantic for stricter linting rules. +- Using Lints for stricter linting rules. - Using Hive for platform independent storage that also works for web. - Project structure, const constructors, extracted widgets and many more... @@ -40,7 +40,7 @@ This repository makes use of the following pub packages: | [Flutter Bloc](https://pub.dev/packages/flutter_bloc) | ^7.0.1 | State management* | [Hydrated Bloc](https://pub.dev/packages/hydrated_bloc) | ^7.0.1 | Persists Bloc state with Hive | [Equatable](https://pub.dev/packages/equatable) | ^2.0.2 | Easily compare custom classes, used for Bloc states* -| [Pedantic](https://pub.dev/packages/pedantic) | ^1.11.0 | Stricter linting rules +| [Lints](https://pub.dev/packages/lints) | ^1.0.1 | Stricter linting rules | [Path Provider](https://pub.dev/packages/path_provider) | ^2.0.2 | Get the save path for Hive | [Flutter Displaymode](https://pub.dev/packages/flutter_displaymode) | ^0.3.2 | Support high refresh rate displays | [Easy Localization](https://pub.dev/packages/easy_localization) | ^3.0.0 | Makes localization easy @@ -67,7 +67,7 @@ In order to get a smooth transition for the text colors it is necessary to overr If a package is not listed, then removing it from [pubspec.yaml](./pubspec.yaml) as well as all imports and uses should be enough. This is required for removing every packages, the following instructions are an addition to that. -#### Pedantic +#### Lints Delete the [analysis_options.yaml](./analysis_options.yaml) file. As an alternative you can modify the rules in this file or use a different package like [Lint](https://pub.dev/packages/lint). diff --git a/analysis_options.yaml b/analysis_options.yaml index f49fa824..ea2c9e94 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1 @@ -include: package:pedantic/analysis_options.1.11.0.yaml \ No newline at end of file +include: package:lints/recommended.yaml \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index f68f24cd..de6a9f9b 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -8,7 +8,7 @@ "localization_content": "Simplified translations with the Easy Translations package.", "linting_title": "Linting", - "linting_content": "Stricter linting rules with pedantic recommended by Google.", + "linting_content": "Stricter linting rules with lints recommended by the Dart team.", "storage_title": "Storage", "storage_content": "Blazing fast key-value database written in pure Dart with Hive.", @@ -37,7 +37,7 @@ "bloc": "Bloc", "hydrated_bloc": "Hydrated bloc", "equatable": "Equatable", - "pedantic": "Pedantic", + "lints": "Lints", "path_provider": "Path provider", "flutter_displaymode": "Displaymode", "easy_localization": "Easy localization", diff --git a/lib/ui/screens/second_screen.dart b/lib/ui/screens/second_screen.dart index e03f040f..d1109e09 100644 --- a/lib/ui/screens/second_screen.dart +++ b/lib/ui/screens/second_screen.dart @@ -84,9 +84,9 @@ class SecondScreen extends StatelessWidget { url: 'https://pub.dev/packages/equatable', ), const GridItem( - title: 'pedantic', + title: 'lints', icon: Ionicons.options_outline, - url: 'https://pub.dev/packages/pedantic', + url: 'https://pub.dev/packages/lints', ), const GridItem( title: 'path_provider', diff --git a/pubspec.lock b/pubspec.lock index d2c41ad8..288e6b9d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -175,6 +175,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.3" + lints: + dependency: "direct main" + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: @@ -238,13 +245,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - pedantic: - dependency: "direct main" - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" platform: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 6c8a38af..97c67966 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,7 +28,7 @@ dependencies: flutter_bloc: ^7.0.1 hydrated_bloc: ^7.0.1 equatable: ^2.0.2 - pedantic: ^1.11.0 + lints: ^1.0.1 path_provider: ^2.0.2 flutter_displaymode: ^0.3.2 easy_localization: ^3.0.0 -- GitLab