Skip to content

Commit

Permalink
Update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
zediah committed Jun 29, 2021
1 parent 5635d1a commit e3a60d2
Show file tree
Hide file tree
Showing 6 changed files with 505 additions and 658 deletions.
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@
"@babel/preset-env": "^7.14.7"
},
"devDependencies": {
"@babel/cli": "7.14.3",
"@babel/core": "7.14.3",
"@babel/cli": "7.14.5",
"@babel/core": "7.14.6",
"@babel/eslint-parser": "7.14.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.14.2",
"@babel/plugin-proposal-optional-chaining": "7.14.2",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.14.5",
"@babel/plugin-proposal-optional-chaining": "7.14.5",
"chai": "^4.2.0",
"eslint": "^4.0.0",
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^11.0.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^3.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"mocha": "^5.2.0",
"prettier": "^2.3.1"
"prettier": "^2.3.2"
}
}
16 changes: 8 additions & 8 deletions src/currency/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const dollarPrefixes = {
'AUD': 'A',
'CAD': 'CA',
'HKD': 'HK',
'MOP': 'MOP',
'NZD': 'NZ',
'SGD': 'S',
'TWD': 'NT',
'USD': 'US',
AUD: 'A',
CAD: 'CA',
HKD: 'HK',
MOP: 'MOP',
NZD: 'NZ',
SGD: 'S',
TWD: 'NT',
USD: 'US',
}

function addDollarType(formattedAmount, currencyCode) {
Expand Down
4 changes: 2 additions & 2 deletions src/flights/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const ALLOWED_DESTINATIONS = [
]

const ALLOWED_DESTINATION_CODES = ALLOWED_DESTINATIONS.map(
destination => destination.code
destination => destination.code,
)

const ALLOWED_DESTINATION_NAMES = ALLOWED_DESTINATIONS.map(
destination => destination.name
destination => destination.name,
)

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion src/offer/duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const getCountsString = (packages, field) => {
}

const getFromPackages = (packages, offerType, holidayTypes) => {
let dayOrNightsData = dayOrNights[offerType]
const dayOrNightsData = dayOrNights[offerType]

if (holidayTypes) {
// Block for holidayTypes
Expand Down
6 changes: 3 additions & 3 deletions src/offer/flexiNights.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function calculatePackagePrices(offerPackagePrices, extraNights = 0) {
}

/**
* Generates a single option for combination of package/package option/extra nights given
* Generates a single option for combination of package/package option/extra nights given
*
* @param {*} offerPackage a package of an offer
* @param {*} packageOption a package option of a package in an offer, optional
Expand All @@ -39,7 +39,7 @@ function generateOption(offerPackage, packageOption, extraNights = 0) {
}

/**
* Generates a list of all the options a user can purchase for a package,
* Generates a list of all the options a user can purchase for a package,
* including all options available from the flexible nights configuration
*
* @param {*} pkg a package of an offer
Expand All @@ -48,7 +48,7 @@ function generateOption(offerPackage, packageOption, extraNights = 0) {
function generateAllOptions(pkg) {
const extraNightsCount = (pkg.flexible_nights && pkg.max_extra_nights) || 0
// package options are optionally setup, so fallback to base package if no options
const packageOptions = !!pkg.package_options?.length ? pkg.package_options : [{ fk_room_rate_id: pkg.fk_room_rate_id }]
const packageOptions = pkg.package_options?.length ? pkg.package_options : [{ fk_room_rate_id: pkg.fk_room_rate_id }]

return packageOptions.flatMap(packageOption => {
return [
Expand Down
Loading

0 comments on commit e3a60d2

Please sign in to comment.