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

added schema validation and updated lint configuration #182

Merged
merged 1 commit into from
Dec 21, 2016

Conversation

trescube
Copy link
Contributor

  • use Joi for sub-config schema validation, incorporated into download_data.js and import.js
  • copied .jslintrc from latest api

Copy link
Member

@orangejulius orangejulius left a comment

Choose a reason for hiding this comment

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

looks great overall. did some other changes sneak in?

console.error('Inability to parse JSON usually means that WOF has been cloned ' +
'without using git-lfs, please see instructions here: ' +
'https://github.com/whosonfirst/whosonfirst-data#git-and-large-files');
next(null, {});
next(parse_err);
}
Copy link
Member

Choose a reason for hiding this comment

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

this all changes the behavior here. It's actually a change we want to make, but maybe it should be in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So make lint updates in a separate PR?

Copy link
Member

Choose a reason for hiding this comment

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

No, lint updates are fine to change. But the changes to this file change the behavior, because any error will now stop the stream. We want to do that (As mentioned in this comment), but it seems better to make that change in its own PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lint is complaining about the long lines, that's why I changed them. I'll disable that in .jslintrc for now.

use Joi for sub-config schema validation, incorporated into download_data.js and import.js
copied .jslintrc from latest api
Copy link
Member

@orangejulius orangejulius left a comment

Choose a reason for hiding this comment

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

looks good now!

@trescube trescube merged commit 5683108 into master Dec 21, 2016
@trescube trescube deleted the add-joi-config-validation branch December 21, 2016 16:52
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.

2 participants