eslint-watch icon indicating copy to clipboard operation
eslint-watch copied to clipboard

`--watch` doesn't respect file overrides, relies erroneously on `--ext`

Open jleider opened this issue 1 year ago • 0 comments

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

  1. Broken version: yarn run esw --watch --changed --cache --color --config='.eslintrc.js' '**/*.{ts,tsx}' '.**/*.{ts,tsx}'
  2. Working version: yarn run esw --watch --changed --cache --color --config='.eslintrc.js' --ext='.ts,.tsx' '**/*.{ts,tsx}' '.**/*.{ts,tsx}'

jleider avatar Nov 28 '23 20:11 jleider