{"id":20012,"library":"eslint-watch","title":"eslint-watch","description":"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.","status":"active","version":"8.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/rizowski/eslint-watch","tags":["javascript","eslint","plugin","command line tool","watch","linter","cli"],"install":[{"cmd":"npm install eslint-watch","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-watch","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-watch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; eslint-watch wraps eslint and requires it to be installed","package":"eslint","optional":false}],"imports":[{"note":"eslint-watch is used via the `esw` command, not `eslint`. It can be installed globally or as a devDependency and run via npx.","wrong":"eslint --watch","symbol":"esw (CLI command)","correct":"npx esw --watch"},{"note":"eslint-watch is primarily used as a CLI tool; require is possible but not common. There is no default export.","wrong":"import esw from 'eslint-watch';","symbol":"require('eslint-watch')","correct":"const esw = require('eslint-watch');"},{"note":"TypeScript definitions are available as a separate package. Version 8.0.0 of eslint-watch may require @types/eslint-watch for type annotations.","wrong":"npm install @types/eslint-watch","symbol":"@types/eslint-watch","correct":"npm install -D @types/eslint-watch"}],"quickstart":{"code":"npm init -y\nnpm install -D eslint eslint-watch\n# create a .eslintrc.json:\necho '{\"env\": {\"node\": true, \"es2020\": true}, \"extends\": \"eslint:recommended\"}' > .eslintrc.json\n# add a script to package.json:\nnode -e \"const p=require('./package.json'); p.scripts.lint='esw . --watch'; require('fs').writeFileSync('./package.json', JSON.stringify(p,null,2))\"\nnpm run lint","lang":"bash","description":"Initialize a project, install dependencies, create basic config, and run eslint-watch in watch mode."},"warnings":[{"fix":"Upgrade to Node.js >=12.22.0, ^14.17.0, or >=16.0.0 and ESLint >=8","message":"Dropped support for Node.js 10 and ESLint <8 in v8.0.0","severity":"breaking","affected_versions":"<8.0.0"},{"fix":"Upgrade to Node.js >=10.12.0 and ESLint >=7","message":"Dropped support for Node.js 8 and ESLint <7 in v7.0.0","severity":"breaking","affected_versions":"<7.0.0"},{"fix":"Use --version to show eslint-watch version or --versions to show both ESLint and eslint-watch versions","message":"--esw-version flag removed in v5.0.0; use --version or --versions instead","severity":"deprecated","affected_versions":">=5.0.0 <6.0.0"},{"fix":"Add .eslintcache to watch-ignore or upgrade to v6.0.1+","message":"Watch mode may double-lint if .eslintcache is not ignored by default (fixed in v6.0.1)","severity":"gotcha","affected_versions":"<6.0.1"},{"fix":"Use --watch-ignore flag to add additional ignore patterns as regex strings","message":"Default watch ignore pattern includes .git, node_modules, bower_components, and .eslintcache; custom ignores via --watch-ignore","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install -D eslint` in the project directory.","cause":"eslint is not installed as a dependency in the project.","error":"Error: Cannot find module 'eslint'"},{"fix":"Run `npm install -D eslint-watch` (or global install) and ensure node_modules/.bin is in PATH.","cause":"eslint-watch is not installed.","error":"Error: Cannot find module 'eslint-watch'"},{"fix":"Install locally (`npm install -D eslint-watch`) and run via npx: `npx esw`","cause":"eslint-watch is not installed globally or locally, or the bin path is not in PATH.","error":"esw: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}