Skip to content

Commit

Permalink
chore(linter): migrated to flutter_lints with additional rules (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
daadu authored Dec 17, 2021
1 parent 0ff2ec1 commit 14a751b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 9 deletions.
36 changes: 29 additions & 7 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
include: package:pedantic/analysis_options.yaml
# 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`.

analyzer:
exclude: [build/**]
strong-mode:
implicit-casts: false
# 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:
- camel_case_types
- public_member_api_docs
# doc-style related: https://dart.dev/guides/language/effective-dart/documentation
- package_api_docs
- public_member_api_docs
- comment_references
- slash_for_doc_comments
# pub related: https://dart.dev/tools/linter-rules#pub-rules
- depend_on_referenced_packages
- secure_pubspec_urls

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
1 change: 1 addition & 0 deletions demo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4
flutter_launcher_icons: ^0.9.0

flutter_icons:
Expand Down
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.4


# For information on the generic Dart part of this file, see the
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
test: any
pedantic: ^1.11.0
flutter_lints: ^1.0.4


# For information on the generic Dart part of this file, see the
Expand Down

0 comments on commit 14a751b

Please sign in to comment.