Skip to content

Commit

Permalink
feat(lint): add lint support
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-max committed May 21, 2019
1 parent a77bc29 commit 1d1a302
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 11 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"build": "rm -rf dist && webpack",
"preversion": "npm run build && git add dist",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
"precommit": "echo done",
"commitmsg": "commitlint -e $GIT_PARAMS"
"precommit": "yarn lint",
"commitmsg": "commitlint -e $GIT_PARAMS",
"lint": "tslint --project tsconfig.json"
},
"dependencies": {
"conventional-changelog-cli": "^2.0.1",
Expand All @@ -20,9 +21,11 @@
"devDependencies": {
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"@moneytree/tslint-rules": "^1.0.2",
"@types/qs": "^6.5.1",
"awesome-typescript-loader": "^5.2.0",
"husky": "^0.14.3",
"tslint": "^5.16.0",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const DOMAIN = 'getmoneytree.com'
export const DOMAIN = 'getmoneytree.com';

export const VAULT = {
SUBDOMAIN: 'vault',
TEST_SUBDOMAIN: 'vault-staging',
TEST_SUBDOMAIN: 'vault-staging'
};

export const MY_ACCOUNT = {
Expand All @@ -12,4 +12,4 @@ export const MY_ACCOUNT = {
OAUTH: 'oauth/authorize',
SETTINGS: 'settings'
}
}
};
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class LinkSDK {
private params: IParams;
private oauthParams: IOauthParams;

init(config: IConfig): void {
public init(config: IConfig): void {
if (!config.clientId) {
throw new Error('Need a clientId to initialise');
}
Expand Down Expand Up @@ -89,7 +89,7 @@ class LinkSDK {
}

// Open My Account to authorize application to use MtLink API
authorize(options: IMyAccountOptions = {}): void {
public authorize(options: IMyAccountOptions = {}): void {
const { newTab = false, email, authPage, backTo, showAuthToggle } = options;

const params = encodeConfigWithParams(
Expand All @@ -107,7 +107,7 @@ class LinkSDK {
}

// Open the Vault page
openVault(options: IVaultOptions = {}): void {
public openVault(options: IVaultOptions = {}): void {
const { newTab = false, backTo = location.href } = options;
const params = encodeConfigWithParams(this.params, {
sdk_platform: 'js',
Expand All @@ -119,7 +119,7 @@ class LinkSDK {
}

// Open the Guest settings page
openSettings(options: IMyAccountOptions = {}): void {
public openSettings(options: IMyAccountOptions = {}): void {
const { newTab = false, backTo = location.href } = options;

const params = encodeConfigWithParams(this.params, {
Expand Down
6 changes: 6 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["@moneytree/tslint-rules"],
"linterOptions": {
"exclude": ["**/node_modules/**"]
}
}
Loading

0 comments on commit 1d1a302

Please sign in to comment.