Skip to content

Commit 50ee9e2

Browse files
committed
chore: prepare v2.0.0
1 parent 3496888 commit 50ee9e2

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
## 1.x.x
1+
## 2.0.0
22

33
* Added rule [flutter_style_todos](https://dart-lang.github.io/linter/lints/flutter_style_todos.html)
4+
* Created custom rules with the package [custom_lint](https://pub.dev/packages/custom_lint)
5+
* `avoid_as`: Avoid using `as` keyword :warning:
6+
* `avoid_non_null_assertion`: Avoid using `!` operator :warning:
47

58
## 1.1.1
69

README.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,25 @@ You can use 2 different sets of rules:
1515
* `dart`: for Dart projects
1616
* `flutter`: for Flutter projects (includes `dart` rules)
1717

18-
## Install
18+
## Installing fd_lints
1919

20-
Add the version you want to your `pubspec.yaml`:
20+
* Add both fd_lints and custom_lint to your `pubspec.yaml` file:
2121

2222
```yaml
2323
dev_dependencies:
24-
fd_lints: any
24+
custom_lint:
25+
fd_lints:
2526
```
2627
27-
Creates an `analysis_options.yaml` file in the root of your project and add the following content:
28+
* Include the set of rules you want to use and enable `custom_lint`'s plugin in your `analysis_options.yaml` file:
2829

2930
```yaml
30-
include: package:fd_lints/dart.yaml # For Dart projects
31-
# include: package:fd_lints/flutter.yaml # For Flutter projects
31+
include: package:fd_lints/dart.yaml # Recommended for Dart projects
32+
# include: package:fd_lints/flutter.yaml # Recommended for Flutter projects
33+
34+
analyzer:
35+
plugins:
36+
- custom_lint
3237
```
3338

3439
## Analyzer
@@ -55,6 +60,15 @@ The following files are excluded by default:
5560
* :warning: : warning
5661
* :x: : error
5762

63+
### Custom
64+
65+
Those rules were created by us by using the [custom_lint](https://pub.dev/packages/custom_lint) package.
66+
67+
| **Rule** | **Severity** |
68+
|----------------------------------------------------------|----------------------|
69+
| avoid_non_null_assertion | :warning: |
70+
| avoid_as | :warning: |
71+
5872
### Dart
5973

6074
| **Rule** | **Severity** |

example/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ dev_dependencies:
1616
1717
```yaml
1818
include: package:fd_lints/dart.yaml
19+
20+
analyzer:
21+
plugins:
22+
- custom_lint
1923
```

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: fd_lints
22
description: An opiniated set of lint rules for Dart and Flutter projects. Made
33
by yours truly Floating Dartists.
4-
version: 1.1.1
4+
version: 2.0.0
55
repository: https://github.com/Floating-Dartists/fd_lints
66
issue_tracker: https://github.com/Floating-Dartists/fd_lints/issues
77

0 commit comments

Comments
 (0)