{"id":25963,"library":"mt-lint","title":"mt-lint","description":"A static code analysis tool for iOS, Android, and JavaScript projects, designed to be integrated into development workflows. Current stable version is 0.0.21, released with a focus on Xcode 9 compatibility and Git pre-commit hooks. It supports custom rules and analysis for iOS (including CocoaPods projects) and JS, with basic Android support. Unlike general-purpose linters, mt-lint is specifically tailored for mobile app development, automating code checks on commit to enforce coding standards.","status":"active","version":"0.0.21","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install mt-lint","lang":"bash","label":"npm"},{"cmd":"yarn add mt-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add mt-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Node.js >= 7.x","package":"node","optional":false},{"reason":"Used for pre-commit hook integration","package":"git","optional":false}],"imports":[{"note":"Package does not export a programmatic API; expected usage is as a CLI tool.","wrong":"const mtLint = require('mt-lint')","symbol":"default","correct":"import mtLint from 'mt-lint'"}],"quickstart":{"code":"npm install -g mt-lint\nmt-lint add -P ios\nmt-lint start my_project_path","lang":"javascript","description":"Installs mt-lint globally, sets the platform to iOS, and starts static analysis on a project."},"warnings":[{"fix":"Set COMPILER_INDEX_STORE_ENABLE = NO in Xcode build settings or add the provided CocoaPods post_install hook.","message":"iOS projects using Xcode 9 must set COMPILER_INDEX_STORE_ENABLE to NO to avoid compilation issues.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use mt-lint add -H <git-path> -S <proj-path> to specify both paths explicitly.","message":"For iOS projects, the .git directory must be in the same parent directory as the .xcodeproj/.xcworkspace file for automatic pre-commit hook to work.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Add --no-verify flag to git commit command for emergency commits.","message":"If the pre-commit hook is active and a commit fails analysis, the commit is blocked. To skip the hook, use git commit --no-verify or -n.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Keep using -P for now; future versions may add auto-detection.","message":"The -P option for setting platform may be deprecated in future versions in favor of automatic detection.","severity":"deprecated","affected_versions":">=0.0.21"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install -g mt-lint` to install globally.","cause":"mt-lint is not installed globally or not in PATH","error":"mt-lint: command not found"},{"fix":"Execute `mt-lint add -P ios` (or android/js) before running other commands.","cause":"You must set the platform before running start or other commands.","error":"Error: Platform not set. Please use mt-lint add -P <platform> first."},{"fix":"Ensure you provide the correct path to the .git directory or the project root that contains it.","cause":"The path provided with -H does not point to a directory containing .git.","error":"Git hook installation failed: .git directory not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}