Comments (8)
Thanks for submitting this. I'll take a look at this in a few hours and post my resolutions here.
edit: Now that I think about it, similar options are not being passed into the watcher. With the fix I'll be sure to include any other options.
from eslint-watch.
@takajun Let me know if you see any more issues with the latest version.
from eslint-watch.
@rizowski Thank you for your work!
But, unfortunately I got the same result on the same test scenario with [email protected].
i.e. conf/.eslintrc.json
is used for the initial lint, but .eslintrc.json
is used for the lint on the watching task.
[email protected], [email protected], [email protected]
Z:\>set DEBUG=esw:* & node_modules\.bin\esw -w -c conf/.eslintrc.json sample/*.js
esw:eslint-cli Loaded +0ms
esw:eslint-cli EsLint path: Z:\node_modules\.bin\eslint.cmd +0ms
esw:eslint-help Loaded +50ms
esw:options Loaded +40ms
esw:watcher Loaded +320ms
esw:arg-parser Loaded +0ms
esw:esw-cli Loaded +0ms
esw:eslint-help Executing help +10ms
esw:eslint-cli Linting: undefined +0ms
esw:eslint-help Help text received +350ms
esw:eslint-help noAlias +0ms false
esw:eslint-help Alias found: -c +0ms
esw:eslint-help Parsing --config +0ms
esw:eslint-help noAlias +10ms true
esw:eslint-help Parsing --no-eslintrc +0ms
esw:eslint-help Parsing no option +0ms --no-eslintrc
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --env +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --ext +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --global +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --parser +0ms
esw:eslint-help noAlias +10ms true
esw:eslint-help Parsing --cache +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --cache-file +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --cache-location +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --rulesdir +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --plugin +10ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --rule +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --ignore-path +0ms
esw:eslint-help noAlias +10ms true
esw:eslint-help Parsing --no-ignore +0ms
esw:eslint-help Parsing no option +0ms --no-ignore
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --ignore-pattern +0ms
esw:eslint-help noAlias +10ms true
esw:eslint-help Parsing --stdin +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --stdin-filename +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --quiet +10ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --max-warnings +0ms
esw:eslint-help noAlias +0ms false
esw:eslint-help Alias found: -o +0ms
esw:eslint-help Parsing --output-file +10ms
esw:eslint-help noAlias +0ms false
esw:eslint-help Alias found: -f +0ms
esw:eslint-help Parsing --format +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --no-color +10ms
esw:eslint-help Parsing no option +0ms --no-color
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --init +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --fix +10ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --debug +0ms
esw:eslint-help noAlias +0ms false
esw:eslint-help Alias found: -h +0ms
esw:eslint-help Parsing --help +10ms
esw:eslint-help noAlias +0ms false
esw:eslint-help Alias found: -v +0ms
esw:eslint-help Parsing --version +0ms
esw:eslint-help noAlias +0ms true
esw:eslint-help Parsing --no-inline-config +10ms
esw:eslint-help Parsing no option +0ms --no-inline-config
esw:esw-cli Arguments passed: [ 'C:\\Program Files\\nodejs\\node.exe', 'Z:\\node_modules\\eslint-watch\\bin\\esw', '-w', '-c', 'conf/.eslintrc.json', 'sample/*.js' ] +10ms
esw:esw-cli Parsing args +10ms
esw:arg-parser Directories to check: [ 'sample/*.js' ] +0ms
esw:arg-parser Args [ '-w', '-c', 'conf/.eslintrc.json', 'sample/*.js' ] +0ms
esw:arg-parser Pushing item: -c +10ms
esw:arg-parser Pushing item: conf/.eslintrc.json +0ms
esw:arg-parser Pushing item: sample/*.js +0ms
esw:arg-parser setting custom formatter +10ms
esw:arg-parser GetPath: simple-detail +0ms
esw:esw-cli Running initial lint +0ms
esw:esw-cli [ '-c', 'conf/.eslintrc.json', 'sample/*.js', '-f', 'Z:\\node_modules\\eslint-watch\\src\\formatters\\simple-detail' ] +0ms
esw:eslint-cli Linting: [ 'sample/*.js' ] +10ms
esw:esw-cli -w seen +0ms
esw:watcher { config: 'conf/.eslintrc.json' } +10ms
esw:watcher { watch: true, config: 'conf/.eslintrc.json', format: 'simple-detail', eslintrc: true, ignore: true, color: true, inlineConfig: true, _: [ 'sample/*.js' ] } +20ms
esw:watcher Watching: [ 'sample/*.js' ] +100ms
Z:\sample\test.js (1/0)
✖ 1:22 Unnecessary semicolon no-extra-semi
✖ 1 error (13:22:11)
esw:esw-cli Setting exit code to: 1 +420ms
File saved without changes.
esw:watcher Changed: +7s sample\test.js
esw:watcher lintFile: sample\test.js +20ms
esw:watcher result: { filePath: 'Z:\\sample\\test.js', messages: [ { ruleId: 'no-extra-semi', severity: 1, message: 'Unnecessary semicolon.', line: 1, column: 22, nodeType: 'EmptyStatement', source: 'console.log(\'hello\');;', fix: [Obje
t] } ], errorCount: 0, warningCount: 1 } +70ms
Z:\sample\test.js (0/1)
! 1:22 Unnecessary semicolon no-extra-semi
! 1 warning (13:22:18)
from eslint-watch.
npm link
. I'll keep you updated.
from eslint-watch.
@takajun Will you try this branch out before I pull it in just to make sure it works on your machine: watch-lint-fix
.
from eslint-watch.
@rizowski Works fine in this time!
from eslint-watch.
@takajun Cool, I will be sure to have this released before the end of the day.
from eslint-watch.
2.1.9 should contain the fix for -c
from eslint-watch.
Related Issues (20)
- esw --watch throws EPERM on Windows HOT 4
- Doesn't track file changes with --ext js,jsx HOT 4
- esw results are doubled/shown twice HOT 6
- Option to not print "clean" message; only errors HOT 4
- Changing branches on git triggers dozens of concurrent `eslint` processes to be created HOT 3
- Hope to have more comfortable information. HOT 2
- npm audit high priority warning HOT 1
- Error parsing '--rule' CLI option HOT 2
- Missing Module HOT 3
- Running `esw --changed -w` causes non-JS files to attempt to be linted HOT 4
- `--clear --color -w` causes duplicated output HOT 4
- Slowness, maybe because it's not just linting an individual file? not sure HOT 1
- Watch mode does print to the console HOT 4
- ESLint 8 support HOT 2
- "The --print-config option must be used with exactly one file name." HOT 1
- Nothing happens HOT 6
- `ENOENT` of `eslint` causes a silent exit rather than an expected error message to install `eslint`
- Print a message upon file watch trigger HOT 3
- --watch-ignore should include by default the ignored patterns
- Tried it and had to uninstall it HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-watch.