Skip to content

Commit

Permalink
build(travis): fix matrix scripts (#3614)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour authored Mar 20, 2019
1 parent ea91962 commit 5f41fc6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ script:
- '${SCRIPT}'
env:
matrix:
- SCRIPT=./scripts/ci/functional-test.sh
- SCRIPT=yarn run test
- SCRIPT=yarn run lint
- SCRIPT=yarn run type-check
- SCRIPT='./scripts/ci/functional-test.sh'
- SCRIPT='yarn run test'
- SCRIPT='yarn run lint'
- SCRIPT='yarn run type-check'
global:
- CXX=g++-4.8
- SAUCE_USERNAME=isjs
Expand Down
6 changes: 3 additions & 3 deletions src/lib/utils/capitalize.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function capitalize(string: string) {
function capitalize(text: string) {
return (
string
text
.toString()
.charAt(0)
.toUpperCase() + string.toString().slice(1)
.toUpperCase() + text.toString().slice(1)
);
}

Expand Down
14 changes: 8 additions & 6 deletions src/lib/utils/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,28 @@ type WidgetParam = {
connector?: boolean;
};

export function createDocumentationLink({
export const createDocumentationLink = ({
name,
connector = false,
}: WidgetParam) {
}: WidgetParam) => {
return [
'https://www.algolia.com/doc/api-reference/widgets/',
name,
'/js/',
connector ? '#connector' : '',
].join('');
}
};

export function createDocumentationMessageGenerator(...widgets: WidgetParam[]) {
export const createDocumentationMessageGenerator = (
...widgets: WidgetParam[]
) => {
const links = widgets
.map(widget => createDocumentationLink(widget))
.join(', ');

return function(message: string) {
return (message: string) => {
return [message, `See documentation: ${links}`]
.filter(Boolean)
.join('\n\n');
};
}
};
2 changes: 1 addition & 1 deletion src/lib/utils/prefixKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import mapKeys from 'lodash/mapKeys';

function prefixKeys(prefix: string, obj: object) {
if (obj) {
return mapKeys(obj, (_value, key) => prefix + key);
return mapKeys(obj, (_0, key) => prefix + key);
}

return undefined;
Expand Down

0 comments on commit 5f41fc6

Please sign in to comment.