Skip to content

Commit

Permalink
Add precommit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu committed Nov 4, 2019
1 parent 49d464f commit e3c78a6
Show file tree
Hide file tree
Showing 8 changed files with 401 additions and 262 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install
run: yarn
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
- uses: actions/checkout@v1
- name: Install
run: yarn
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@
"javascript",
"node"
],
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,js}": [
"eslint --max-warnings 100",
"git add"
],
"*.{ts,js,json,md,yml}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"aws-param-store": "^2.1.0",
"aws-sdk": "^2.475.0",
Expand All @@ -47,9 +62,9 @@
"@types/node": "^12.0.8",
"eslint": "^6.6.0",
"eslint-config-neo": "^0.4.2",
"husky": "^1.3.1",
"husky": "^3.0.9",
"jest": "^24.8.0",
"lint-staged": "^8.2.1",
"lint-staged": "^9.4.2",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"ts-jest": "^24.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/__mocks__/get-secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import awsSecretsManagerResponse from '../../test/fixtures/secrets/aws-secrets-m

const getSecret = (_: string, __: string): object => {
return JSON.parse(awsSecretsManagerResponse.Value);
}
};

export default getSecret;
2 changes: 1 addition & 1 deletion test/fixtures/javascript/config.development.local.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
KEY_10: 'development local key'
}
};
2 changes: 1 addition & 1 deletion test/fixtures/javascript/config.local.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
KEY_7: 'local key',
KEY_9: 'bar'
}
};
2 changes: 1 addition & 1 deletion test/fixtures/typescript/config.development.local.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
KEY_10: 'development local key'
}
};
2 changes: 1 addition & 1 deletion test/fixtures/typescript/config.local.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
KEY_7: 'local key',
KEY_9: 'bar'
}
};
Loading

0 comments on commit e3c78a6

Please sign in to comment.