eslint-watch
eslint-watch copied to clipboard
`--watch` doesn't respect file overrides, relies erroneously on `--ext`
Environment
- Node Version: v20.5.1
- Eslint-Watch Version: v8.0.0
- Eslint Version: v8.54.0
Basic Description of the problem
Using the --watch
and --changed
flags don't trigger a re-lint. The initial run will run eslint but any file change for any linted files never get picked up.
Enabling debug mode said my files were getting skipped. Turns out I had to add --ext='.ts,.tsx'
but thats not clear from the docs and is not needed for normal eslint when used with file overrides as stated in their docs.
https://eslint.org/docs/latest/use/command-line-interface#--ext
I would expect eslint-watch to respect the underlying eslint behavior in this regard.
How to reproduce it
- Broken version:
yarn run esw --watch --changed --cache --color --config='.eslintrc.js' '**/*.{ts,tsx}' '.**/*.{ts,tsx}'
- Working version:
yarn run esw --watch --changed --cache --color --config='.eslintrc.js' --ext='.ts,.tsx' '**/*.{ts,tsx}' '.**/*.{ts,tsx}'