Skip to content

Commit

Permalink
Lint error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dchertousov committed Oct 31, 2016
1 parent 336ee0d commit d12214c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
36 changes: 19 additions & 17 deletions src/Request/uapi-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,25 @@ function mergeLeaf(item) {

function defaultConfig(ver) {
// do not collapse arrays with single objects or objects with single keys if they have this name
const noCollapseList = ['air:BookingInfo', 'air:FareRule',
// there's one SSR per each airline (per each passenger), they are usually identical
'common_' + ver + ':SSR',
'air:AirReservation',
'air:PassengerType',
'air:TicketInfo',
'common_' + ver + ':ResponseMessage',
'air:BaggageAllowanceInfo',
'air:CarryOnAllowanceInfo',
'hotel:RateInfo',
'hotel:HotelSearchResult',
// 'hotel:Amenities',
'hotel:Amenity',
'hotel:HotelDetailItem',
'hotel:AggregatorHotelDetails',
'common_' + ver + ':MediaItem',
];
const noCollapseList = [
'air:BookingInfo',
'air:FareRule',
// there's one SSR per each airline (per each passenger), they are usually identical
'common_' + ver + ':SSR',
'air:AirReservation',
'air:PassengerType',
'air:TicketInfo',
'common_' + ver + ':ResponseMessage',
'air:BaggageAllowanceInfo',
'air:CarryOnAllowanceInfo',
'hotel:RateInfo',
'hotel:HotelSearchResult',
// 'hotel:Amenities',
'hotel:Amenity',
'hotel:HotelDetailItem',
'hotel:AggregatorHotelDetails',
'common_' + ver + ':MediaItem',
];

// Non-single field objects don't get collapsed
// from single item arrays into objects automatically, e.g.
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Hotels/HotelsValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { HotelsValidationError } = errors;

function Validator(params) {
this.params = params;
this.reg = /^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/;
this.reg = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
}

Validator.prototype.end = function () {
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Utils/UtilsValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { UtilsValidationError } = errors;

function Validator(params) {
this.params = params;
this.reg = /^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$/;
this.reg = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
}

Validator.prototype.end = function () {
Expand Down

0 comments on commit d12214c

Please sign in to comment.