xlint
raw JSON → 0.2.2 verified Fri May 01 auth: no javascript deprecated
A powerful CLI tool for running any lint solution (JSLint, JSHint, etc.) on JavaScript files. It recursively scans .js and executable Node.js files, supports external configuration files (.lint), understands .gitignore and .lintignore rules, includes optional caching and live console updates via --watch. The current stable version is 0.2.2, released with basic Node.js support (>=0.8) and minimal dependencies. It is a niche tool with limited maintenance; alternatives like ESLint are more modern and widely adopted.
Common errors
error Error: Cannot find module 'path/to/jslint-module.js' ↓
cause Invalid --linter path or missing linter module.
fix
Install a valid linter module (e.g., xlint-jslint) and provide correct absolute or relative path.
error xlint: Neither specified linter was provided, nor default could be resolved ↓
cause No --linter argument and no linter set in .lint configuration.
fix
Add --linter option or create a .lint file with 'linter' key pointing to a valid linter module.
error No files to lint ↓
cause No JavaScript files found in the target directory or all files ignored via .gitignore/.lintignore.
fix
Ensure target directory contains .js files or executable Node.js files not ignored by ignore rules.
Warnings
deprecated xlint is no longer actively maintained. Consider using ESLint or other modern linters. ↓
fix Migrate to ESLint or a maintained alternative.
gotcha Requires a separate linter module (e.g., xlint-jslint). Without one, xlint cannot lint anything. ↓
fix Install a linter module like 'npm install xlint-jslint' and pass its path.
gotcha Default linter is not provided. You must specify --linter option or configure it in .lint file. ↓
fix Always provide --linter=... or set 'linter' in .lint configuration file.
gotcha Configuration files (.lint) use a custom format similar to UNIX conf files, not JSON. Syntax errors may cause silent failures. ↓
fix Validate .lint file syntax carefully; use comments starting with # and key-value pairs.
Install
npm install xlint yarn add xlint pnpm add xlint Imports
- xlint (CLI) wrong
npm install xlint (local install rarely useful)correctnpm install -g xlint
Quickstart
npm install -g xlint
mkdir -p myproject && cd myproject
echo 'var x = 1;' > test.js
echo '{"linter": "path/to/jslint.js"}' > .lint
xlint --linter=path/to/jslint.js --depth=Infinity .