Xo: Watch mode

Created on 3 Aug 2016  路  10Comments  路  Source: xojs/xo

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

enhancement

Most helpful comment

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

All 10 comments

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

I'm using onchange at the moment:

onchange '*.js' -i -- xo

@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

I like this idea.

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?

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

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

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?

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

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

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

I meant to show lint output only for changed files.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveALee picture SteveALee  路  5Comments

vadimdemedes picture vadimdemedes  路  3Comments

EdJoPaTo picture EdJoPaTo  路  3Comments

sindresorhus picture sindresorhus  路  6Comments

SamVerschueren picture SamVerschueren  路  4Comments