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

Add --watch option. #828

Closed
ravshansbox opened this issue Mar 23, 2017 · 7 comments

Comments

@ravshansbox
Copy link

commented Mar 23, 2017

No description provided.

@feross

This comment has been minimized.

Copy link
Member

commented Mar 23, 2017

Without additional information, it's unclear what this is even asking for.

@feross feross closed this Mar 23, 2017

@ravshansbox

This comment has been minimized.

Copy link
Author

commented Mar 23, 2017

It would be useful if we had a --watch option that prevents process from quitting and in case of change relinting changed files only.

@enjoylife

This comment has been minimized.

Copy link

commented Mar 24, 2017

Anyone come across plugins or forks which have a watch or continuous mode?

@yuvilio

This comment has been minimized.

Copy link

commented Mar 25, 2017

I've gotten it to work by having separate watch tools. In my case it was for my npm scripts setup with the nodemon powered npm-watch .

  "watch": {
    "standardlint": "assets/js"
  },
  "scripts": {
    "watch": "npm-watch",
    "standardlint" : "standard assets/js/main.js",
}

Then just run the watch task and to carry out the monitoring and running of the `standard`` lnter

$ npm run watch

For more direct command line usage, you can probably use nodemon directly with something like nodemon --watch assets/js/main.js --exec "standard assets/js/main.js"

I agree that a --watch flag would be a nice convenience addition. It's got plenty of conventional examples in similar tools (similar to eslint-watch postcss-watch, ...). It can also be handy in npm scripts, for watch tasks to just pass npm run lint:js -- --watch to one time run tasks.

@ravshansbox

This comment has been minimized.

Copy link
Author

commented Mar 26, 2017

Will it lint only changed files or all?

@axelpale

This comment has been minimized.

Copy link

commented Dec 13, 2017

+1

@mxdi9i7

This comment has been minimized.

Copy link

commented Mar 26, 2018

the no-unused-vars rule in standard js is going to be annoying during development when u have watch on, i think it makes more sense to run linting during pre-commit instead of during active development

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
6 participants
You can’t perform that action at this time.