Closed glebec closed 7 years ago
@glebec Thanks for reporting this. Run the command with DEBUG=esw:*
That should be all the debugging I need.
Here you go:
```
esw:internal-settings Eslint installed locally node_modules/.bin/eslint +0ms
esw:internal-settings { eslintPath: 'node_modules/.bin/eslint',
esw:internal-settings platform: 'darwin',
esw:internal-settings isWindows: false } +2ms
esw:eslint-cli Loaded +40ms
esw:eslint-help Loaded +19ms
esw:options Loaded +0ms
esw:eslint-help Executing help +0ms
esw:eslint-cli eslint: '--help' +2ms
esw:executor node_modules/.bin/eslint [ '--help' ] +2ms
esw:eslint-cli { exitCode: 0,
esw:eslint-cli message: 'eslint [options] file.js [file.js] [dir]\n\nBasic configuration:\n -c, --config path::String Use configuration from this file or shareable config\n --no-eslintrc Disable use of configuration from .eslintrc\n --env [String] Specify environments\n --ext [String] Specify JavaScript file extensions - default: .js\n --global [String] Define global variables\n --parser String Specify the parser to be used\n --parser-options Object Specify parser options\n\nCaching:\n --cache Only check changed files - default: false\n --cache-file path::String Path to the cache file. Deprecated: use --cache-location - default: .eslintcache\n --cache-location path::String Path to the cache file or directory\n\nSpecifying rules and plugins:\n --rulesdir [path::String] Use additional rules from this directory\n --plugin [String] Specify plugins\n --rule Object Specify rules\n\nIgnoring files:\n --ignore-path path::String Specify path of ignore file\n --no-ignore Disable use of ignore files and patterns\n --ignore-pattern [String] Pattern of files to ignore (in addition to those in .eslintignore)\n\nUsing stdin:\n --stdin Lint code provided on
This is a bug. The watcher portion of ESW has it hard coded.
https://github.com/rizowski/eslint-watch/blob/v3.0.0/src/watcher.js#L7 https://github.com/rizowski/eslint-watch/blob/v3.0.0/src/watcher.js#L65
Thanks @rizowski. BTW, if you support 3rd-party linters in watch mode, it would be nice (albeit not critical) to somehow still output the ✔ clean
report for when linting succeeds with no warnings or errors.
A Fix was merged into master. I have a few things I am going to add with this release and publish the fix.
Environment
Basic Description of the problem
ESLint watch seems to "forget" which formatter to use. I am trying to set the formatter to Sindre Sorhus's nice https://github.com/sindresorhus/eslint-formatter-pretty. It's a slightly different version of the
simple-detail
formatter baked intoesw
, based on earlier work by Sindre. However, while the formatter appears correctly for the first pass of the lint, it reverts tosimple-detail
thereafter.How to reproduce it
Debug output:
Running with
DEBUG=*
produces thousands of lines. Are you sure you want them?