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

Incremental lint #277

Closed
scottcorgan opened this issue Oct 1, 2015 · 16 comments

Comments

@scottcorgan
Copy link

commented Oct 1, 2015

Have there been any discussions or attempts and speeding up linting a large codebase with incremental linting (only lint the files that have changed)?

Or, is this a thing already with eslint?

@sindresorhus

This comment has been minimized.

Copy link

commented Oct 1, 2015

ESLint recently got a cache option which can be used by Standard.

@scottcorgan

This comment has been minimized.

@scottcorgan scottcorgan closed this Oct 1, 2015

@Flet

This comment has been minimized.

Copy link
Member

commented Oct 1, 2015

Why close?

@scottcorgan

This comment has been minimized.

Copy link
Author

commented Oct 1, 2015

It's not an issue. More like a reference to an answer now. The solution is with eslint.

@Flet

This comment has been minimized.

Copy link
Member

commented Oct 1, 2015

I guess I'm confused. I don't believe standard (or standard-engine) set the cache or the cacheFile options at all...

...so this issue could be a request to consider turning on eslint caching?

@scottcorgan

This comment has been minimized.

Copy link
Author

commented Oct 1, 2015

Oh duh, you're right. Re-opening.

@scottcorgan scottcorgan reopened this Oct 1, 2015

@rstacruz

This comment has been minimized.

Copy link
Member

commented Oct 2, 2015

yes please. i like running standard with mocha-standard and mocha --watch, this would be very useful.

@nelix

This comment has been minimized.

Copy link

commented Nov 1, 2015

On the subject of incremental linting, an option to only lint files in git diff would be good for commit hooks, CI and perf.

@dcousens

This comment has been minimized.

Copy link
Member

commented Nov 1, 2015

That would also be great for incremental repository linting: where a repository doesn't want to refactor the entire code base at once, but enforce it on all new code.
Very interested in whether someone has a solution for that.

@scottcorgan

This comment has been minimized.

Copy link
Author

commented Jan 15, 2016

Is this something still on the roadmap. I saw that 2 PRs were closed on standard-engine, and I'm not sure why.

standard/standard-engine#18
standard/standard-engine#17

@feross feross added the help wanted label Feb 5, 2016

@feross

This comment has been minimized.

Copy link
Member

commented Feb 5, 2016

Yes, this is something that I'd like to ship since it could greatly improve the time it takes to run standard. It's ~2sec for me on most projects. Would be nice to get that <1sec.

I gave this a go once, but didn't get it working reliably. @scottcorgan If you can make it work, we'll ship it!

feross added a commit to standard/standard-engine that referenced this issue Aug 19, 2016

Add ESLint `cache` option
Running `standard` on a large codebase like
[electron/electron](https://github.com/electron/electron) is now more
than 2x faster on repeated runs, thanks to the ESLint cache feature!

- Before: 3.68s
- After: 1.59s

Fixes: standard/standard#277

(I copied this code from the xo project.)
@feross

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

PR to add support to standard-engine: standard/standard-engine#125

@feross

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

Merged the PR! 🎉

Running standard on a large codebase like electron/electron is now more than 2x faster on repeat runs, thanks to the ESLint cache feature!

  • Before: 3.68s
  • After: 1.59s

👍 👍 👍 👍 👍 👍

This will ship as part of standard v8.

@LinusU

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

Awesome!! 🎉

@samhatoum

This comment has been minimized.

Copy link

commented Dec 26, 2017

I can't see anywhere in the docs how to enable caching this from the package.json. Is this possible?

@feross

This comment has been minimized.

Copy link
Member

commented May 4, 2018

@samhatoum There's nothing to enable. If you're using the standard CLI then the feature is already enabled.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2018

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