lint
執行程式碼檢查與類型驗證
程式碼品質因專案和團隊成員而異。本技能提供標準化的 TypeScript 和 Python linting 命令,您可以自訂並在整個程式碼庫中一致地執行。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“lint”。 Run lint to check for issues
预期结果:
- 發現 3 個 lint 問題:
- - 未使用的匯入:'react' 在第 5 行
- - 'userId' 缺少類型註釋
- - 行長度超標(92 > 80 個字元)
正在使用“lint”。 Run lint with auto-fix
预期结果:
- 已自動套用修復:
- - 在 2 個檔案中排序了匯入
- - 修復了 5 個空白問題
- - 格式化 1 個檔案
安全审计
安全This skill contains only markdown documentation with linting command examples. The 18 static findings are all false positives: markdown fenced code blocks were misidentified as shell backtick execution, metadata URLs as network calls, and words like 'hash' and 'check' triggered pattern matches in documentation text. No executable code, network calls, file system operations, or command execution capabilities exist. This is a pure documentation skill for linting commands.
风险因素
🌐 网络访问 (1)
📁 文件系统访问 (1)
⚙️ 外部命令 (4)
质量评分
你能构建什么
TypeScript 程式碼品質
在 JavaScript 和 TypeScript 專案上執行 biome check 或 eslint,以發現樣式和類型問題
Python 程式碼檢查
使用 ruff 配合 uv 整合進行快速的 Python linting 和格式化
標準化程式碼檢查
在團隊專案中定義一致的 lint 命令,以實現統一的程式碼品質標準
试试这些提示
Run lint to check for issues
Run lint with auto-fix to resolve issues
Run type check on the codebase
Check code formatting matches standards
最佳实践
- 在提交前執行 lint 以便及早發現問題
- 配置自動修復功能以節省處理樣式問題的時間
- 將 lint 命令加入 CI 管道以實現自動化檢查
避免
- 未經審查就忽略 lint 錯誤
- 僅在 CI 失敗時才執行 lint
- 未審查變更就直接使用自動修復