This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<profiles> | |
<profile> | |
<repositories> | |
<repository> | |
<id> central</id> | |
<name> Maven Repository Switchboard</name> | |
<layout> default</layout> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hooks": { | |
"pre-commit": "tsc --noEmit && lint-staged", | |
"pre-push": "yarn install && yarn run test" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { IntlProvider, intlShape } from 'react-intl'; | |
import { mount, render, shallow } from 'enzyme'; | |
const messages = {}; // en.json | |
const intlProvider = new IntlProvider({ locale: 'en', messages, onError: () => '' }, {}); | |
const { intl } = intlProvider.getChildContext(); | |
function nodeWithIntlProp(node) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { configure } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
// React 16 Enzyme adapter | |
configure({ adapter: new Adapter() }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class SagaSpecFactory { | |
static getAPIStub(apiMethodFunc: any, response: object): any { | |
return ({ fn, args }, next) => { | |
if (fn === apiMethodFunc) { | |
return response; | |
} | |
return next(); | |
}; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"extends": ["tslint:latest", "tslint-react", "tslint-eslint-rules", "tslint-config-prettier"], | |
"linterOptions": { | |
"exclude": ["lib/**"] | |
}, | |
"jsRules": { | |
"object-literal-sort-keys": false | |
}, | |
"rules": { | |
"jsx-no-lambda": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios'; | |
/** | |
* Cancel previous pending request | |
*/ | |
const pending = new Map(); | |
export const addPending = config => { | |
const url = [config.method, config.url].join('&'); | |
config.cancelToken = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wd=`pwd` | |
function print(){ | |
echo "===========$*============" | |
} | |
print "Start check style for Java" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Extract the host where the server is running, and add the URL to the APIs | |
[[ $HOST =~ ^https?://[^/]+ ]] && HOST="${BASH_REMATCH[0]}/api/v4/projects/" | |
# The description of our new MR, we want to remove the branch after the MR has | |
# been closed | |
BODY="{ | |
\"id\": ${CI_PROJECT_ID}, | |
\"source_branch\": \"${CI_COMMIT_REF_NAME}\", | |
\"target_branch\": \"${TARGET_BRANCH}\", |
OlderNewer