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

Use broccoli-persistent-filter #21

Merged
merged 2 commits into from
Apr 11, 2016

Conversation

nickiaconis
Copy link
Contributor

Hot on the heels of #14, here are the changes to use broccoli-persistent-filter. I've set it up to persist by default. It can be overridden by passing { persist: false } as an option.

Tests are passing: https://travis-ci.org/nickiaconis/broccoli-eslinter/builds/115196276
Edit: This repo now leverages its own CI testing.

EslintValidationFilter.prototype.processString = function processString(content, relativePath) {
'use strict'; // eslint-disable-line strict
EslintValidationFilter.prototype.baseDir = function baseDir() {
return process.cwd();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally __dirname

};

EslintValidationFilter.prototype.cacheKeyProcessString = function cacheKeyProcessString(content, relativePath) {
return md5Hex([content, relativePath, JSON.stringify(this.options)]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use json-stable-stringify as the unordered json stringify busts the cache incorrectly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to handle the testGenerator function manually here, I think

@nickiaconis nickiaconis force-pushed the persistent-filter branch 3 times, most recently from dcc6dd0 to 7ca5a74 Compare March 11, 2016 01:20
@nickiaconis
Copy link
Contributor Author

@rwjblue Good points. I've addressed them, and this should be ready for another review.

@nickiaconis
Copy link
Contributor Author

Added the result of getConfigForFile to the file cache key, per Robert's comment on #26.

@BrianSipple BrianSipple added this to the 2.2.0 milestone Apr 6, 2016
@BrianSipple
Copy link
Collaborator

@nickiaconis pinging for a heads-up about a few conflicts after merging #25.

@nickiaconis
Copy link
Contributor Author

Thanks for the heads-up. Conflicts resolved.

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

Successfully merging this pull request may close these issues.

None yet

3 participants