From 54ddef08acead5e319f00e4a968a137000470438 Mon Sep 17 00:00:00 2001 From: Yurii Prykhodko Date: Mon, 31 Jan 2022 11:38:21 +0200 Subject: [PATCH] Add solid_lints --- analysis_options.yaml | 30 +------- lib/main.dart | 15 +--- lib/src/template_app.dart | 14 ++++ pubspec.lock | 139 +++++++++++++++++++++++++++++++++++--- pubspec.yaml | 2 +- 5 files changed, 147 insertions(+), 53 deletions(-) create mode 100644 lib/src/template_app.dart diff --git a/analysis_options.yaml b/analysis_options.yaml index 61b6c4d..21bc10a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,29 +1 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +include: package:solid_lints/analysis_options.yaml diff --git a/lib/main.dart b/lib/main.dart index 0f91599..b0af6ce 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,17 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:three_days/src/template_app.dart'; void main() { - runApp(const TemplateApp()); -} - -class TemplateApp extends StatelessWidget { - const TemplateApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Template app', - home: Container(), - ); - } + runApp(TemplateApp()); } diff --git a/lib/src/template_app.dart b/lib/src/template_app.dart new file mode 100644 index 0000000..81658fa --- /dev/null +++ b/lib/src/template_app.dart @@ -0,0 +1,14 @@ +import 'package:flutter/material.dart'; + +/// This is a template application. +/// +/// Feel free to replace this with your custom code. +class TemplateApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Template app', + home: Container(), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 306911b..c40c55f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,41 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "32.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.0" + ansicolor: + dependency: transitive + description: + name: ansicolor + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" async: dependency: transitive description: @@ -29,6 +64,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.5" clock: dependency: transitive description: @@ -43,6 +85,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.1" cupertino_icons: dependency: "direct main" description: @@ -50,6 +113,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" + dart_code_metrics: + dependency: transitive + description: + name: dart_code_metrics + url: "https://pub.dartlang.org" + source: hosted + version: "4.9.1" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" fake_async: dependency: transitive description: @@ -57,30 +134,37 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.2" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - lints: + glob: dependency: transitive description: - name: lints + name: glob url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.2" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.0" matcher: dependency: transitive description: @@ -95,6 +179,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.7.0" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" path: dependency: transitive description: @@ -102,11 +193,25 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + solid_lints: + dependency: "direct dev" + description: + name: solid_lints + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.9" source_span: dependency: transitive description: @@ -163,5 +268,19 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" sdks: dart: ">=2.15.1 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 44babef..bf255e1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.0 + solid_lints: 0.0.9 flutter: uses-material-design: true