lint-my-app
raw JSON → 3.7.65 verified Fri May 01 auth: no javascript maintenance
lint-my-app is a zero-config linting tool that wraps lint-staged and husky to automatically fix staged files on commit and lint the entire codebase on push. It ships with sensible defaults (using ESLint, stylelint, prettier, and more) and respects existing configuration in your project. As of v3.7.65, it requires Node.js >=12.8.0 and has frequent releases but is in maintenance mode. It differs from alternatives like lint-staged alone by bundling husky configuration and providing built-in linting commands.
Common errors
error Error: Cannot find module 'lint-my-app/husky' ↓
cause Husky config file is not correct or package is not installed.
fix
Ensure lint-my-app is installed: npm install --save-dev lint-my-app
error Unknown command: --lint ↓
cause Using a flag instead of a subcommand.
fix
Use: npx lint-my-app lint
error husky > pre-commit hook failed (add --no-verify to bypass) ↓
cause Linting failed on staged files, preventing commit.
fix
Fix the errors or bypass with --no-verify temporarily.
Warnings
gotcha Husky must be installed separately as a peer dependency. ↓
fix Run: npm install --save-dev husky
gotcha Husky v5+ requires additional configuration; lint-my-app's husky config may not work out of the box. ↓
fix Use husky v4 or adapt to v5's .husky directory structure.
deprecated Package is in maintenance mode with no active development since 2020. ↓
fix Consider migrating to lint-staged + husky directly.
gotcha Only works with git repositories; will error if not inside a git repo. ↓
fix Initialize a git repository with 'git init' before using.
Install
npm install lint-my-app yarn add lint-my-app pnpm add lint-my-app Imports
- default (Husky config) wrong
import huskyConfig from 'lint-my-app/husky';correctmodule.exports = require('lint-my-app/husky'); - CLI commands wrong
npx lint-my-app --lintcorrectnpx lint-my-app lint - huskyrc.js wrong
export { default } from 'lint-my-app/husky';correctmodule.exports = require('lint-my-app/husky');
Quickstart
npm install --save-dev lint-my-app husky
cat > .huskyrc.js << 'EOF'
module.exports = require('lint-my-app/husky');
EOF
git add . && git commit -m 'init lint-my-app'