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

Watch mode #136

Closed
rafaeleyng opened this issue Aug 3, 2016 · 10 comments
Closed

Watch mode #136

rafaeleyng opened this issue Aug 3, 2016 · 10 comments

Comments

@rafaeleyng
Copy link

Didn't find an option for that, and would be awesome.

@alcalyn
Copy link

alcalyn commented Aug 4, 2016

I think its better to watch files changes with gulp, then use xo with gulp to check code style of changed files, no ?

@fregante
Copy link
Member

I'm using onchange at the moment:

onchange '*.js' -i -- xo

@rafaeleyng
Copy link
Author

@alcalyn It would work, but I was trying to use xo + ava exactly to avoid Gulp, so would be better without it.
@bfred-it It seems nice! Never heard of it, will take a look asap

Thanks

@jamestalmage
Copy link
Contributor

I like this idea.

@sindresorhus sindresorhus changed the title Feature request: watch mode Watch mode Oct 9, 2016
@vadimdemedes vadimdemedes mentioned this issue Oct 23, 2016
3 tasks
@vadimdemedes
Copy link

I started working on this in #157. I'd love everyone's feedback on the following. Here's how the current watch output looks:

screen shot 2016-10-23 at 4 23 51 pm

Any ideas on how to beautifully separate reports between reruns here?

@vadimdemedes
Copy link

Maybe before each new report it could show "lib/controller.js changed", so that it's easily recognizable.

@fregante
Copy link
Member

AVA has a smart watch mode, you could look at how it behaves. I think it clears the screen between runs.

@vadimdemedes
Copy link

As for smart watch mode, I considered doing something like AVA, but in XO we have way less complexity. That's why I went with simply re-running the check each time. Do you think it'd be better to just lint changed files?

I think it clears the screen between runs.

Might do that as well. @sindresorhus @jamestalmage do you think it's the way to go?

@sindresorhus
Copy link
Member

Do you think it'd be better to just lint changed files?

XO already caches files, so this is handled for you.

@vadimdemedes
Copy link

XO already caches files, so this is handled for you.

I meant to show lint output only for changed files.

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

Successfully merging a pull request may close this issue.

6 participants