Skip to content

Conversation

Copy link

Copilot AI commented Oct 21, 2025

Overview

This PR modernizes the codebase by removing deprecated lint rules, updating dependencies to their latest versions, and upgrading GitHub Actions workflows to use current versions.

Changes

1. Remove deprecated unsafe_html lint rule

The unsafe_html lint rule was removed in Dart 3.7.0. This rule has been removed from both the main analysis_options.yaml and example/analysis_options.yaml files to eliminate analyzer warnings:

# Before
linter:
  rules:
    - unawaited_futures
    - unsafe_html  # ❌ Deprecated

# After
linter:
  rules:
    - unawaited_futures
    # unsafe_html removed (deprecated in Dart 3.7.0)

2. Update lints package to 6.0.0

Updated the lints package from version 3.0.0 to 6.0.0 in pubspec.yaml. This brings in the latest Dart lint rules and best practices, ensuring the codebase follows current coding standards.

3. Remove unnecessary library name

Modern Dart no longer requires explicit library names. Changed library dart_either; to library; in lib/dart_either.dart to follow the unnecessary_library_name lint recommendation:

// Before
library dart_either;

// After
library;

4. Update GitHub Actions workflows

Updated dart-lang/setup-dart action from v1.4 to v1.7 in both CI workflow files (.github/workflows/dart.yml and .github/workflows/example.yml). This ensures CI uses the latest Dart setup action with improvements, bug fixes, and better performance.

Verification

  • ✅ All 92 tests pass
  • ✅ Analyzer runs cleanly with --fatal-infos --fatal-warnings
  • ✅ Code formatting is correct
  • ✅ Example code runs successfully
  • ✅ No breaking changes to public API

Benefits

  • Cleaner codebase: Removes deprecated elements and follows modern Dart conventions
  • Better CI/CD: Latest GitHub Actions provide improved reliability and features
  • Future-proof: Updated dependencies ensure compatibility with current and future Dart versions
  • Improved code quality: Latest lint rules help catch potential issues early

Closes #[issue_number]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl-ssl.google.com
    • Triggering command: wget -qO- REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Find room for improvement</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #29


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Identify areas for improvement Modernize codebase: Remove deprecated lints, update dependencies, and upgrade GitHub Actions Oct 21, 2025
Copilot AI requested a review from hoc081098 October 21, 2025 11:45
Copilot finished work on behalf of hoc081098 October 21, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find room for improvement

2 participants