Skip to content

Commit

Permalink
Add real Dart 3.5 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Feb 15, 2025
1 parent bb0e6d8 commit 3e2ea36
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 2 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.6.1

Requires Dart `sdk: '>=3.5.0'`

- Enable [`document_ignores`](https://dart.dev/tools/linter-rules/document_ignores.html) for strict mode
- Enable [`invalid_runtime_check_with_js_interop_types`](https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types.html)
- Enable [`unintended_html_in_doc_comment`](https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment.html)

## 2.6.0

Failed release, accidentally published Dart 3.6 rules with Dart 3.5 SDK constraints.
Redacted. Use 2.6.1 instead.

## 2.5.0

Requires Dart `sdk: '>=3.4.0'`
Expand Down
20 changes: 20 additions & 0 deletions lib/casual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ linter:
# https://dart.dev/tools/linter-rules/do_not_use_environment
# - do_not_use_environment

# Ensures that ignore comments are properly documented with a reason
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/document_ignores
# - document_ignores

# Add a comment why no further error handling is required
#
# https://dart.dev/tools/linter-rules/empty_catches
Expand Down Expand Up @@ -496,6 +503,12 @@ linter:
# https://dart.dev/tools/linter-rules/invalid_case_patterns
- invalid_case_patterns

# Prevents invalid runtime checks with JS interop types
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types
- invalid_runtime_check_with_js_interop_types

# Hint to join return and assignment.
#
Expand Down Expand Up @@ -1119,6 +1132,13 @@ linter:
# https://dart.dev/tools/linter-rules/unnecessary_to_list_in_spreads
- unnecessary_to_list_in_spreads

# Prevents unintended HTML in doc comments which could cause rendering issues
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment
- unintended_html_in_doc_comment

# It's just unused code, nothing to worry about
#
# Linter v1.28.0
Expand Down
21 changes: 21 additions & 0 deletions lib/strict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ linter:
# https://dart.dev/tools/linter-rules/do_not_use_environment
# - do_not_use_environment

# Ensures that ignore comments are properly documented with a reason
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/document_ignores
- document_ignores

# Add a comment why no further error handling is required
#
# https://dart.dev/tools/linter-rules/empty_catches
Expand Down Expand Up @@ -498,6 +505,13 @@ linter:
# https://dart.dev/tools/linter-rules/invalid_case_patterns
- invalid_case_patterns

# Prevents invalid runtime checks with JS interop types
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/invalid_runtime_check_with_js_interop_types
- invalid_runtime_check_with_js_interop_types

# Hint to join return and assignment.
#
# https://dart.dev/tools/linter-rules/join_return_with_assignment
Expand Down Expand Up @@ -1120,6 +1134,13 @@ linter:
# https://dart.dev/tools/linter-rules/unnecessary_to_list_in_spreads
- unnecessary_to_list_in_spreads

# Prevents unintended HTML in doc comments which could cause rendering issues
#
# Dart SDK: >= 3.5.0
#
# https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment
- unintended_html_in_doc_comment

# Highlights unreachable/unused code in libraries containing a main function / @pragma('vm:entry-point')
#
# Linter v1.28.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.5.0
version: 2.6.1
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.4.0 <4.0.0'
sdk: '>=3.5.0 <4.0.0'

0 comments on commit 3e2ea36

Please sign in to comment.