-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Support ESLint "--cache" option #168
Comments
I also came here to look into this because of the EmberConf talk. Big 👍 from me. |
@rondale-sc tl;dr this will require deep changes in the implementation of right now @stefanpenner @rwjblue @hjdivad please correct me if I'm wrong |
What's the advantage of using eslint's |
|
I thought we fixed this.
I believe it is intentional, and may the fix i thought fixed 1. |
Experimenting with eslints own caching may be a good idea. I'm curious as to the downsides. |
@Turbo87 So you think the changes need to occur in broccoli-lint-eslint then? If so, should I begin work there? Also, I'm not entirely certain how to start with this. I suspect it will involve getting a broccoli pipeline in place and create a little repo that would facilitate easy testing? Would benchmarking be helpful? |
ember-cli/broccoli-lint-eslint#90 should give you an idea on how to best test broccoli plugins |
@stefanpenner - Yes, we cache the output of each file's linting and report it back to the console for a warm build.
This is what I am referring to above, we do not run eslint unless the cache has been busted. We do however print the same error/warning messages to the console as we emitted the last time the file was linted. I think it is probably worth while to discuss what we want, and less about how to get there. For example, if what we want is that all warnings/errors print out (for all files even for those not changed) for every rebuild this should be pretty straight forward.. |
@rwjblue @stefanpenner it's possible that I misunderstood the current implementation. I thought only the generated test files were persisted between builds. |
Nope. Checkout: |
@rwjblue So ostensibly this already happens and the only discussion is whether we make it more obvious that it is caching by showing only changed files lint output? |
I'd like to pass the --quiet option to eslint so as to not display warnings during CI builds. I hope a fix for this would be able to apply that as well. |
Bumping this as it would be extremely nice to have. Unclear why the rest of broccoli-lint-eslint's options aren't supported either, should add those as well. |
Bumps [testdouble](https://github.com/testdouble/testdouble.js) from 3.2.2 to 3.8.2. <details> <summary>Changelog</summary> *Sourced from [testdouble's changelog](https://github.com/testdouble/testdouble.js/blob/master/CHANGELOG.md).* > # Change Log > > ## [v3.8.1](https://github.com/testdouble/testdouble.js/tree/v3.8.1) (2018-05-05) > [Full Changelog](testdouble/testdouble.js@v3.8.0...v3.8.1) > > **Implemented enhancements:** > > - Better verification messages [\#161](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/161) > > **Closed issues:** > > - Trouble replacing ES6 classes [\#365](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/365) > - You have a global leak: `\_\_core-js\_shared\_\_` [\#364](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/364) > - testdouble causes bluebird to emit Unhandled rejection [\#168](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/168) > - Should style API of chai.js doesn't always work on test doubles since 1.6.2 [\#134](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/134) > > ## [v3.8.0](https://github.com/testdouble/testdouble.js/tree/v3.8.0) (2018-04-29) > [Full Changelog](testdouble/testdouble.js@v3.7.0...v3.8.0) > > **Implemented enhancements:** > > - Improve td.replace error message for incorrect module path [\#355](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/355) > > **Closed issues:** > > - td.verify\(object.function\(new Class\("param"\)\)\) not asserting "param" [\#362](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/362) > - How to Stub a Chained Function [\#360](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/360) > - Critical dependency: the request of a dependency is an expression? [\#354](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/354) > > **Merged pull requests:** > > - Better missing module message for td.replace\(\) [\#363](https://github-redirect.dependabot.com/testdouble/testdouble.js/pull/363) ([searls](https://github.com/searls)) > > ## [v3.7.0](https://github.com/testdouble/testdouble.js/tree/v3.7.0) (2018-03-31) > [Full Changelog](testdouble/testdouble.js@v3.6.0...v3.7.0) > > **Closed issues:** > > - Compare dates when using td.matchers.contains [\#358](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/358) > - verifiable thenThrow [\#288](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/288) > - docs: simple page that lists the entire API [\#253](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/253) > - Planning Discussion for a move to TypeScript [\#252](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/252) > - More support for ES Modules [\#246](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/246) > - Consider using \_.isObjectLike rather than \_.isPlainObject within td.object [\#224](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/224) > > **Merged pull requests:** > > - Enhance contains for edge cases, make nesting behave consistently [\#359](https://github-redirect.dependabot.com/testdouble/testdouble.js/pull/359) ([searls](https://github.com/searls)) > > ## [v3.6.0](https://github.com/testdouble/testdouble.js/tree/v3.6.0) (2018-03-24) ></table> ... (truncated) </details> <details> <summary>Commits</summary> - [`a6e4103`](testdouble/testdouble.js@a6e4103) 3.8.2 - [`7b222ae`](testdouble/testdouble.js@7b222ae) Merge pull request [#386](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/386) from testdouble/upgrade-things - [`1e77fb1`](testdouble/testdouble.js@1e77fb1) upgrade example deps - [`25cf41e`](testdouble/testdouble.js@25cf41e) upgrade deps - [`20785c7`](testdouble/testdouble.js@20785c7) clear stupid jasmine warnings - [`5659f33`](testdouble/testdouble.js@5659f33) standard --fix - [`3e03d23`](testdouble/testdouble.js@3e03d23) upgrade everything - [`1bbf695`](testdouble/testdouble.js@1bbf695) Merge pull request [#369](https://github-redirect.dependabot.com/testdouble/testdouble.js/issues/369) from jackjennings/patch-1 - [`952d852`](testdouble/testdouble.js@952d852) Fix method name typo in README example - [`a9216e3`](testdouble/testdouble.js@a9216e3) Adding an AKA td.js b/c our google rank for "td.js" is bad - Additional commits viewable in [compare view](testdouble/testdouble.js@v3.2.2...v3.8.2) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=testdouble&package-manager=npm_and_yarn&previous-version=3.2.2&new-version=3.8.2)](https://dependabot.com/compatibility-score.html?dependency-name=testdouble&package-manager=npm_and_yarn&previous-version=3.2.2&new-version=3.8.2) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. Dependabot will **not** automatically merge this PR because it includes a minor update to a development dependency. --- **Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit. You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com). <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) Finally, you can contact us by mentioning @dependabot. </details>
Inspired by a talk at Emberconf I though it might be a good idea to enable eslint caching. I expected this to be a pretty simple config option in eslintrc.js or likewise, but it seems that it is a bit more complicated
I think we can likely accomplish this by merging options in the lintTree func and passing those all the way down to eslint
https://github.com/ember-cli/ember-cli-eslint/blob/master/index.js#L34
https://github.com/ember-cli/broccoli-lint-eslint/blob/master/lib/index.js#L41
https://github.com/ember-cli/broccoli-lint-eslint/blob/master/lib/index.js#L72
https://github.com/eslint/eslint/blob/master/lib/cli-engine.js#L638
I'd like to work on this, but I really wanted to get some feedback before diving in any further. Is this a good idea? Are there potential problems or incompatibilities that would prevent us from doing this?
The text was updated successfully, but these errors were encountered: