Registry / testing / mt-lint

mt-lint

JSON →
library0.0.21jsnpmunverified

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.

npm install mt-lint
INSTALL
IMPORT
SIG · MT-LINT
M
mt-lint
testingjavascriptv0.0.21
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import mtLint from 'mt-lint'
const mtLint = require('mt-lint')
Package does not export a programmatic API; expected usage is as a CLI tool.

Installs mt-lint globally, sets the platform to iOS, and starts static analysis on a project.

npm install -g mt-lint mt-lint add -P ios mt-lint start my_project_path
mt-lint --version
Debug
Known issues
gotchaiOS projects using Xcode 9 must set COMPILER_INDEX_STORE_ENABLE to NO to avoid compilation issues.
fix
Set COMPILER_INDEX_STORE_ENABLE = NO in Xcode build settings or add the provided CocoaPods post_install hook.
affects: >=0.0.0
gotchaFor iOS projects, the .git directory must be in the same parent directory as the .xcodeproj/.xcworkspace file for automatic pre-commit hook to work.
fix
Use mt-lint add -H <git-path> -S <proj-path> to specify both paths explicitly.
affects: >=0.0.0
breakingIf 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.
fix
Add --no-verify flag to git commit command for emergency commits.
affects: >=0.0.0
deprecatedThe -P option for setting platform may be deprecated in future versions in favor of automatic detection.
fix
Keep using -P for now; future versions may add auto-detection.
affects: >=0.0.21
Errors
Common errors & fixes
mt-lint: command not found
mt-lint is not installed globally or not in PATH
fix
Run `npm install -g mt-lint` to install globally.
Error: Platform not set. Please use mt-lint add -P <platform> first.
You must set the platform before running start or other commands.
fix
Execute `mt-lint add -P ios` (or android/js) before running other commands.
Git hook installation failed: .git directory not found.
The path provided with -H does not point to a directory containing .git.
fix
Ensure you provide the correct path to the .git directory or the project root that contains it.
Upgrade
Version history
0.0.21latest on npm
Audit
Dependencies
noderequiredRequires Node.js >= 7.x
gitrequiredUsed for pre-commit hook integration
Agent activity
4 hits · last 30 days
node
4
Resources
mt-lint — npm install mt-lint · libregistry