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

套件詳情v1.3.0

linteo

iteo 使用的 Flutter 和 Dart 程式碼規範

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
382
喜歡數
30
Pub 分數
150

安裝套件

flutter pub add linteo

套件介紹

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

Linteо 是由 iteo 內部開發與使用之 Flutter 與 Dart 程式碼檢查套件,提供一致的程式碼標準與最佳實務。它透過預設的程式碼檢查規則強制執行程式碼品質,協助在各專案中維持乾淨、易讀且易於維護的程式碼。此套件設計給尋求程式碼風格與結構統一的團隊,特別適用於 iteo 生態系統。支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux。透過整合 linteo,開發者能提早發現常見問題,並透過標準化的程式碼審查提升協作效率。

適用情境

  • 強制執行團隊範圍內的程式碼風格
  • 跨多平台應用保持一致性
  • 自動化程式碼品質檢查
  • 支援CI/CD流程
  • 改進新開發者的入職體驗

主要特色

  • 來自 iteo 標準的預定義 lint 規則
  • 跨平台相容性
  • 透過 pub add 輕鬆整合
  • 定期更新以反映最佳實務
  • 與 Flutter 和 Dart 工具鏈無縫整合

適合對象

  • Flutter 開發團隊
  • 使用標準化編碼實務的組織
  • 需要嚴格代碼品質的專案
  • CI/CD 環境
  • 採用共用程式碼規範的團隊

使用建議

  • 需要了解 Dart 程式碼檢查規則
  • 可能需要為非iteo工作流程進行自訂
  • 依賴於 GitHub 托管的來源
  • 不適用於無設定的獨立應用程式
  • 最適合在協作開發環境中使用

原始 README

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

linteo

License: MIT style: linteo


Provides set of Flutter and Dart linter rules used at iteo. By default, package enables all available lint rules (all_lint_rules.yaml) and disables some of them upon team agreement.

Install

  1. Depend on this package as a dev_dependency by running flutter pub add --dev linteo
  2. Create analysis_options.yaml file at the root of the package (alongside the pubspec.yaml file) and include: package:linteo/analysis_options.yaml from it.

Which version to use?

Dart Version Linteo Version
3.1 1.3.0
2.17 1.2.0
2.17 1.1.0
2.17 1.0.1
2.18 1.0.0
Example analysis_options.yaml file
include: package:linteo/analysis_options.yaml

linter:
  rules:
    # Adjust package to specific project needs
    # package_api_docs: true  # Uncomment to enable rule

Suppress lint

Your project may require special case. Lint rules can be suppressed at the line, file, or project level.

Line Level

Use an ignore: comment directly above the line

// ignore: public_member_api_docs
class A {}
File level

Use an ignore_for_file: comment at the top of the file


// ignore_for_file: public_member_api_docs

class A {}

class B {}
Project Level

Update root analysis_options.yaml according to your needs:

include: package:linteo/analysis_options.yaml
linter:
  rules:
    public_member_api_docs: true

Badge

Support the project using a badge in your repository

style:linteo

所屬分類

原始碼儲存庫

使用此套件的專案