Coder Social home page Coder Social logo

Comments (8)

rizowski avatar rizowski commented on May 27, 2024

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.

rizowski avatar rizowski commented on May 27, 2024

@takajun Let me know if you see any more issues with the latest version.

from eslint-watch.

takajun avatar takajun commented on May 27, 2024

@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.

rizowski avatar rizowski commented on May 27, 2024

😕 Hmm That's strange... I will do a little more testing to see what might be up. It could be something on my end, I was having some issues with npm link. I'll keep you updated.

from eslint-watch.

rizowski avatar rizowski commented on May 27, 2024

@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.

takajun avatar takajun commented on May 27, 2024

@rizowski Works fine in this time!

from eslint-watch.

rizowski avatar rizowski commented on May 27, 2024

@takajun Cool, I will be sure to have this released before the end of the day.

from eslint-watch.

rizowski avatar rizowski commented on May 27, 2024

2.1.9 should contain the fix for -c

from eslint-watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.