Changed the watcher to require the specified formatter upon initializtion. Checked lint and fixed tests.
What was the problem/Ticket Number
108
How does this solve the problem?
Changes behaviour of watcher to call require('path/to/formatter') at runtime when the watcher is set up. This formatter is then used when re-linting.
The runtime call to require() mirrors the behaviour of ESLint itself.
How to duplicate the issue
create a basic ESLint formatter outside the project
run eslint-watch from the command line specifying the path to the new formatter using the -f option
initial lint output should be from the new formatter
change a watched file.
before this fix, the linter would revert to use simple-detail, Now, it uses the passed option.
Options tested include the formatters built in to eslint-watch (simple, simple-detail, simple-success), and full paths to any other formatter.
Changed the watcher to require the specified formatter upon initializtion. Checked lint and fixed tests.
What was the problem/Ticket Number
108
How does this solve the problem?
Changes behaviour of watcher to call require('path/to/formatter') at runtime when the watcher is set up. This formatter is then used when re-linting. The runtime call to require() mirrors the behaviour of ESLint itself.
How to duplicate the issue