https://github.com/mockturtl/tidy
Dart lint rules for analysis_options.yaml
https://github.com/mockturtl/tidy
analysis-options dart-lints
Last synced: 5 months ago
JSON representation
Dart lint rules for analysis_options.yaml
- Host: GitHub
- URL: https://github.com/mockturtl/tidy
- Owner: mockturtl
- License: mit
- Created: 2021-01-17T02:34:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T18:21:47.000Z (7 months ago)
- Last Synced: 2024-12-19T14:04:08.077Z (5 months ago)
- Topics: analysis-options, dart-lints
- Language: Shell
- Homepage: https://pub.dev/packages/tidy
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/packages/tidy)
tidy
====The complete annotated set of Dart analysis options, mostly enabled.
See [`tool/compare.sh`](tool/compare.sh) for a diff with [all rules](https://github.com/dart-lang/sdk/blob/main/pkg/linter/example/all.yaml).
Opinionated bits are commented.Note a rule's existence upstream does not imply stability, or publication to [dart.dev/tools/linter-rules][].
[dart.dev/tools/linter-rules]: https://dart.dev/tools/linter-rules
Usage
------ Add `tidy` to your `dev_dependencies`, per .
```sh
$ dart pub add -d tidy
# or flutter pub add -d tidy
```- Include the rules in `analysis_options.yaml` at the root of your project:
```yaml
include: package:tidy/analysis_options.yaml # or specify a version: analysis_options.1.0.0.yaml# You probably do want some customization.
analyzer:
exclude:
- lib/src/**/*.g.dart# Override to taste as your project evolves.
# https://dart.dev/guides/language/analysis-options#disabling-individual-rules
linter:
rules:
public_member_api_docs: true
prefer_final_locals: true
require_trailing_commas: true
unnecessary_final: false
use_key_in_widget_constructors: true
```### Versioning
This package follows Dart SDK versions, and aims to maintain [parity][] with rules available in the stable channel.
Its minimum SDK constraint will bump accordingly. (Your project's Dart version must have `package:linter` with the rules you want to enable.)
In particular, your Flutter version may not ship the latest stable Dart.
[parity]: https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md#linter
### Contributing
Please open a PR if upstream lands a rule not included here.
Steal this badge!
-----------------[](https://pub.dev/packages/tidy)
```md
[](https://pub.dev/packages/tidy)
```