Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions options ignored by watcher #66

Closed
calvinwoo opened this issue Jan 27, 2016 · 5 comments
Closed

Extensions options ignored by watcher #66

calvinwoo opened this issue Jan 27, 2016 · 5 comments

Comments

@calvinwoo
Copy link
Contributor

The extensions option, esw -w --ext .js,.jsx, is ignored by the watcher. Instead, it uses the ESLint default, which is .js.

@calvinwoo
Copy link
Contributor Author

I'm planning on looking into this and making a pull request.

@rizowski
Copy link
Owner

Can you post the version of eslint and eslint-watch you know you are using? Also posting the debug log.

DEBUG=esw:* esw -w --ext .js,.jsx

calvinwoo added a commit to calvinwoo/eslint-watch that referenced this issue Jan 27, 2016
@calvinwoo
Copy link
Contributor Author

Calvins-MacBook-Pro:eslint-watch calvinwoo$ DEBUG=esw:* esw -w --ext .js,.jsx .
  esw:eslint-cli Loaded +0ms
  esw:eslint-cli EsLint path: /Users/calvinwoo/Gitprojects/eslint-watch/node_modules/.bin/eslint +3ms
  esw:eslint-help Loaded +35ms
  esw:options Loaded +27ms
  esw:watcher Loaded +242ms
  esw:arg-parser Loaded +26ms
  esw:esw-cli Loaded +0ms
  esw:eslint-help Executing help +1ms
  esw:eslint-cli Linting: undefined +0ms
  esw:eslint-help Help text received +265ms
  esw:eslint-help noAlias +1ms false
  esw:eslint-help Alias found: -c +0ms
  esw:eslint-help Parsing --config +1ms
  esw:eslint-help noAlias +0ms true
  esw:eslint-help Parsing --no-eslintrc +1ms
  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 +0ms true
  esw:eslint-help Parsing --cache +0ms
  esw:eslint-help noAlias +1ms 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 +0ms
  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 +0ms 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 +0ms true
  esw:eslint-help Parsing --stdin +0ms
  esw:eslint-help noAlias +0ms true
  esw:eslint-help Parsing --stdin-filename +1ms
  esw:eslint-help noAlias +0ms true
  esw:eslint-help Parsing --quiet +0ms
  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 +0ms
  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 +0ms
  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 +1ms
  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 +0ms
  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 +0ms
  esw:eslint-help Parsing no option +0ms --no-inline-config
  esw:esw-cli Arguments passed: [ '/Users/calvinwoo/.nvm/versions/node/v4.2.1/bin/node', '/usr/local/bin/esw', '-w', '--ext', '.js,.jsx', '.' ] +5ms
  esw:esw-cli Parsing args +3ms
  esw:arg-parser Directories to check: [ '.' ] +1ms
  esw:arg-parser Args [ '-w', '--ext', '.js,.jsx', '.' ] +0ms
  esw:arg-parser Pushing item: --ext +0ms
  esw:arg-parser Pushing item: .js,.jsx +0ms
  esw:arg-parser Pushing item: . +0ms
  esw:arg-parser setting custom formatter +0ms
  esw:arg-parser GetPath: simple-detail +0ms
  esw:esw-cli Running initial lint +0ms
  esw:esw-cli [ '--ext', '.js,.jsx', '.', '-f', '/usr/local/lib/node_modules/eslint-watch/src/formatters/simple-detail' ] +1ms
  esw:eslint-cli Linting: [ '.' ] +0ms
  esw:esw-cli -w seen +2ms
  esw:watcher Watching: [ '.' ] +5ms
✓ Clean (9:59:59 AM)

  esw:esw-cli Setting exit code to: 0 +668ms
  esw:watcher Changed: +699ms src/.watcher.js.swp
  esw:watcher Changed: +3ms test/.test.jsx.swp
  esw:watcher Changed: +8s src/watcher.js
  esw:watcher lintFile: src/watcher.js +93ms
  esw:watcher result: { filePath: '/Users/calvinwoo/Gitprojects/eslint-watch/src/watcher.js', messages: [], errorCount: 0, warningCount: 0 } +85ms
✓ /Users/calvinwoo/Gitprojects/eslint-watch/src/watcher.js (10:00:08 AM)

  esw:watcher Changed: +2s test/test.jsx

NodeJS version 4.2.1, ESLint version 1.10.3.

As you can see from last couple lines of the debug log, Chokidar is detecting all file changes. It runs the linter for the .js file, but not for the .jsx file.

rizowski added a commit that referenced this issue Jan 28, 2016
Watch for changes to files with custom extensions, Fixes #66
@rizowski
Copy link
Owner

@calvinwoo Its been released with version 2.1.7

@calvinwoo
Copy link
Contributor Author

🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants