搜尋套件、儲存庫與 APP 分類

套件詳情v1.2.1

mvvm_linter

MVVM Linter 是一個設計用來強制執行 MVVM 最佳實務與程式碼標準的工具。

近 30 天下載
16
喜歡數
2
Pub 分數
50

安裝套件

flutter pub add mvvm_linter

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

MVVM Linter 是一個 Flutter/Dart 套件,用於在 MVVM(模型-視圖-檢視模型)架構模式中強制執行一致的程式碼標準與最佳實務。它透過偵測常見的反模式以及與推薦的 MVVM 慣例的偏離,協助開發人員維持乾淨、結構化且可維護的程式碼。透過將此 linter 整合至開發工作流程中,團隊可以確保專案之間的一致性並減少技術負債。該工具在需要嚴格遵守架構原則的協作環境中尤為實用。

適用情境

  • 在團隊項目中強制執行MVVM結構
  • 自動化MVVM模式的程式碼品質檢查
  • 在大型Flutter應用程式中保持一致性
  • 識別不當的 ViewModel 或 View 使用
  • 透過清晰的指南支援新開發人員的入職

主要特色

  • MVVM架構特定規則
  • 與 Flutter 分析工具的整合
  • 可自定義的 lint 規則
  • 清晰的錯誤訊息以提示違規
  • 支援自動化程式碼審查

適合對象

  • 使用 MVVM 的 Flutter 團隊
  • 開發者專注於程式碼品質
  • 需要嚴格遵守建築規範的項目
  • 採用標準化開發實踐的團隊
  • CI/CD流水線強制執行編碼標準

使用建議

  • 需要手動設定自定規則
  • 可能需要為新的 Flutter 版本更新
  • 有限的平台特定功能
  • 最好與其他 linter 一起使用
  • 僅適用於基於 MVVM 的專案

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

MVVM Linter

The MVVM Linter is a tool designed to enforce best practices and coding standards in MVVM (Model-View-ViewModel) architecture within your projects. It provides a set of rules and guidelines to help maintain code quality, readability, and consistency.

Features

  • Member Order: Enforces a specified order for class members.
  • Organize Class Order Action: Orders class members according to a predefined structure.

Installation

To install the MVVM Linter, follow these steps:

  1. Add the following dependencies to your pubspec.yaml:
flutter pub add --dev custom_lint mvvm_linter
  1. Update your analysis_options.yaml:
include: package:flutter_lints/flutter.yaml

analyzer:
  plugins:
    - custom_lint
custom_lint:
  rules:
    - mvvm_linter

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。