Skip to content

Commit

Permalink
Add new Dart 3.4 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Feb 15, 2025
1 parent f46826c commit 19a70cc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2.5.0

Requires Dart `sdk: '>=3.4.0'`

- Enable [`unnecessary_library_name`](https://dart-lang.github.io/linter/lints/unnecessary_library_name.html)
- Enable [`missing_code_block_language_in_doc_comment`](https://dart-lang.github.io/linter/lints/missing_code_block_language_in_doc_comment.html)

## 2.4.0

Requires Dart `sdk: '>=3.3.0'`
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Generally, you can just put `lint: ^2.0.0` in your `pubspec.yaml` and pub get th

| Dart Version | Lint Version |
|--------------|---------------------------------------------------------------------|
| `3.4` | [`2.5.0`](https://pub.dev/packages/lint/versions/2.5.0/changelog) |
| `3.3` | [`2.4.0`](https://pub.dev/packages/lint/versions/2.4.0/changelog) |
| `3.2` | [`2.3.0`](https://pub.dev/packages/lint/versions/2.3.0/changelog) |
| `3.1` | [`2.2.0`](https://pub.dev/packages/lint/versions/2.2.0/changelog) |
Expand Down
14 changes: 14 additions & 0 deletions lib/casual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,13 @@ linter:
# https://dart-lang.github.io/linter/lints/literal_only_boolean_expressions.html
# - literal_only_boolean_expressions

# Code blocks in documentation comments should specify a language for better readability
#
# Dart SDK: >= 3.4.0
#
# https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment
# - missing_code_block_language_in_doc_comment

# Don't forget the whitespaces at the end
#
# Dart SDK: >= 2.8.0-dev.10.0 • (Linter v0.1.110)
Expand Down Expand Up @@ -1032,6 +1039,13 @@ linter:
# https://dart-lang.github.io/linter/lints/unnecessary_library_directive.html
- unnecessary_library_directive

# Don't use unnecessary library names
#
# Dart SDK: >= 3.4.0
#
# https://dart.dev/tools/linter-rules/unnecessary_library_name
# - unnecessary_library_name

# Remove the optional `new` keyword
#
# https://dart-lang.github.io/linter/lints/unnecessary_new.html
Expand Down
14 changes: 14 additions & 0 deletions lib/strict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,13 @@ linter:
# https://dart-lang.github.io/linter/lints/literal_only_boolean_expressions.html
# - literal_only_boolean_expressions

# Code blocks in documentation comments should specify a language for better readability
#
# Dart SDK: >= 3.4.0
#
# https://dart.dev/tools/linter-rules/missing_code_block_language_in_doc_comment
- missing_code_block_language_in_doc_comment

# Don't forget the whitespaces at the end
#
# Dart SDK: >= 2.8.0-dev.10.0 • (Linter v0.1.110)
Expand Down Expand Up @@ -1026,6 +1033,13 @@ linter:
# https://dart-lang.github.io/linter/lints/unnecessary_late.html
- unnecessary_late

# Don't use unnecessary library names
#
# Dart SDK: >= 3.4.0
#
# https://dart.dev/tools/linter-rules/unnecessary_library_name
- unnecessary_library_name

# New library syntax, time to migrate
#
# Dart SDK: 2.19.0 • (Linter v1.29.0)
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: lint
version: 2.4.0
version: 2.5.0
description: An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
repository: https://github.com/passsy/dart-lint
issue_tracker: https://github.com/passsy/dart-lint/issues
topics:
- lint

environment:
sdk: '>=3.3.0 <4.0.0'
sdk: '>=3.4.0 <4.0.0'

0 comments on commit 19a70cc

Please sign in to comment.