Registry / testing / umi-lint

umi-lint

JSON →
library2.0.2jsnpmunverified

Configless lint tool that bundles eslint, tslint, stylelint, prettier, lint-staged, and husky into a single zero-config command-line interface. Version 2.0.2 is the latest stable release, with an active maintenance status. It simplifies code quality and formatting by reducing the number of dependencies and configuration files needed for a typical linting setup. Key differentiator: provides a unified CLI that supports linting entire directories, only staged files (via --staged), and integrates multiple linters and formatters with a single command.

npm install umi-lint
INSTALL
IMPORT
SIG · UMI-LINT
U
umi-lint
testingjavascriptv2.0.2
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.

umi-lint
npx umi-lint [options]
import umi-lint from 'umi-lint'
Not a JS library; used as a CLI tool via npx or from scripts in package.json.
umi-lint (direct require)
const umiLint = require('umi-lint')
Can be required programmatically but primary use is CLI. Returns an object with lint methods.
umi-lint (ESM)
import umiLint from 'umi-lint'
import { umiLint } from 'umi-lint'
Default export is the programmatic API; named exports not available.

Demonstrates how to configure umi-lint scripts in package.json for both full source linting and precommit staged file checks with auto-fix.

// Add to package.json scripts: "lint": "umi-lint --eslint src/", "prepare": "umi-lint --staged --eslint --stylelint --prettier --fix" // Run lint: npm run lint
umi-lint --version
Debug
Known issues
gotchaumi-lint does not include its own configuration; you must create .eslintrc, .stylelintrc, and .prettierrc files manually.
fix
Create configuration files in project root as documented by each linter.
affects: >=1.0.0
gotchaThe --eslint flag does not automatically detect TypeScript files; you must specify --eslint.ext='.ts,.tsx' to lint TypeScript.
fix
Use umi-lint --eslint --eslint.ext='.ts,.tsx' or pass options via dot notation: --eslint.ext='.ts,.tsx'.
affects: >=1.0.0
gotchaWhen using --staged, the tool only lints files that are staged in git; ensure you have staged changes before running.
fix
Run 'git add' to stage files before executing umi-lint --staged.
affects: >=1.0.0
deprecatedtslint is bundled but deprecated by the TypeScript team; recommend using eslint with TypeScript parsers instead.
fix
Use --eslint instead of --tslint and configure eslint with @typescript-eslint/parser.
affects: >=2.0.0
gotchaOptions with sub-parameters must use dot notation, e.g., --eslint.debug or -s.formatter=json; incorrect syntax like --eslint-debug may be ignored.
fix
Ensure sub-parameters are passed with dots: --eslint.debug, -s.formatter=json, -p.no-semi.
affects: >=2.0.0
Errors
Common errors & fixes
Error: No eslint configuration found
Missing .eslintrc file in project root
fix
Create .eslintrc file (e.g., .eslintrc.json) with basic configuration.
Cannot find module 'umi-lint'
umi-lint not installed or not in node_modules
fix
Run npm install umi-lint --save-dev or use npx umi-lint.
Error: --staged requires a git repository
Not inside a git repository
fix
Initialize git with 'git init' or run the command inside a git repository.
Error: Unknown option: --eslint.ext='.ts,.tsx'
Using equals sign for sub-parameters instead of dot notation
fix
Use --eslint.ext '.ts,.tsx' or --eslint.ext=.ts,.tsx (no space before value) but prefer dot notation: --eslint.ext='.ts,.tsx'.
Upgrade
Version history
2.0.2latest on npm
Audit
Dependencies
eslintoptionalEnables JavaScript/TypeScript linting when --eslint flag used
prettieroptionalCode formatting when --prettier flag used
stylelintoptionalCSS/SCSS linting when --stylelint flag used
lint-stagedoptionalRuns linters on staged git files via --staged
huskyoptionalGit hooks setup for precommit integration
Agent activity
10 hits · last 30 days
node
10
Resources
umi-lint — npm install umi-lint · libregistry