Registry / devops / eslint-watch

eslint-watch

JSON →
library8.0.0jsnpmunverified

A command-line tool that wraps ESLint with file watching capabilities and improved CLI options. Current stable version is v8.0.0, requiring ESLint >=8 and Node >=12.22.0. Regularly releases new versions matching ESLint major releases. Key differentiator: standalone watcher without needing Webpack, Grunt, or other build tools. Provides watch modes, single-file linting on change, terminal clearing, ignore patterns for watching, and configurable watch delay. All standard ESLint options are forwarded unmodified.

npm install eslint-watch
INSTALL
IMPORT
SIG · ESLINT-WATCH
E
eslint-watch
devopsjavascriptv8.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

esw (CLI command)
npx esw --watch
eslint --watch
eslint-watch is used via the `esw` command, not `eslint`. It can be installed globally or as a devDependency and run via npx.
require('eslint-watch')
const esw = require('eslint-watch');
import esw from 'eslint-watch';
eslint-watch is primarily used as a CLI tool; require is possible but not common. There is no default export.
@types/eslint-watch
npm install -D @types/eslint-watch
npm install @types/eslint-watch
TypeScript definitions are available as a separate package. Version 8.0.0 of eslint-watch may require @types/eslint-watch for type annotations.

Initialize a project, install dependencies, create basic config, and run eslint-watch in watch mode.

npm init -y npm install -D eslint eslint-watch # create a .eslintrc.json: echo '{"env": {"node": true, "es2020": true}, "extends": "eslint:recommended"}' > .eslintrc.json # add a script to package.json: node -e "const p=require('./package.json'); p.scripts.lint='esw . --watch'; require('fs').writeFileSync('./package.json', JSON.stringify(p,null,2))" npm run lint
esw --version
Debug
Known issues
breakingDropped support for Node.js 10 and ESLint <8 in v8.0.0
fix
Upgrade to Node.js >=12.22.0, ^14.17.0, or >=16.0.0 and ESLint >=8
affects: <8.0.0
breakingDropped support for Node.js 8 and ESLint <7 in v7.0.0
fix
Upgrade to Node.js >=10.12.0 and ESLint >=7
affects: <7.0.0
deprecated--esw-version flag removed in v5.0.0; use --version or --versions instead
fix
Use --version to show eslint-watch version or --versions to show both ESLint and eslint-watch versions
affects: >=5.0.0 <6.0.0
gotchaWatch mode may double-lint if .eslintcache is not ignored by default (fixed in v6.0.1)
fix
Add .eslintcache to watch-ignore or upgrade to v6.0.1+
affects: <6.0.1
gotchaDefault watch ignore pattern includes .git, node_modules, bower_components, and .eslintcache; custom ignores via --watch-ignore
fix
Use --watch-ignore flag to add additional ignore patterns as regex strings
affects: >=6.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint'
eslint is not installed as a dependency in the project.
fix
Run `npm install -D eslint` in the project directory.
Error: Cannot find module 'eslint-watch'
eslint-watch is not installed.
fix
Run `npm install -D eslint-watch` (or global install) and ensure node_modules/.bin is in PATH.
esw: command not found
eslint-watch is not installed globally or locally, or the bin path is not in PATH.
fix
Install locally (`npm install -D eslint-watch`) and run via npx: `npx esw`
Upgrade
Version history
8.0.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; eslint-watch wraps eslint and requires it to be installed
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-watch — npm install eslint-watch · libregistry