Set API origin failing linter test
Opened this issue · 1 comments
InPen commented
const setAPIOrigin = (location, config) => {
// strip the leading `'?'`
const search = parseNestedQuery(location.search.slice(1))
if (search.environment === 'development' ||
location.hostname === 'localhost' &&
search.environment !== 'production') {
if (!(config.apiOrigin = config.apiOrigins.development)) {
const port = +('GA'.split('').reduce((p, c) =>
p + c.charCodeAt().toString(16), '')
)
config.apiOrigin = `http://localhost:${port}`
}
} else {
config.apiOrigin = config.apiOrigins.production
}
}
InPen commented
/Users/Maria/Desktop/GA/talk/html-css/lib/set-api-origin.js
23:44 error Unexpected mix of '||' and '&&' no-mixed-operators
24:41 error Unexpected mix of '||' and '&&' no-mixed-operators