Skip to content

Commit 6a3640f

Browse files
authored
Merge pull request #526 from microapidev/ch-setup-tests-linting
[CHORE]: Setup initial packages, tests and linting
2 parents 38d98b7 + b1d7276 commit 6a3640f

16 files changed

Lines changed: 10346 additions & 0 deletions

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PORT=3000

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
build
3+
docs
4+
docker
5+
test
6+
.vscode
7+
koa/views
8+
src/generated
9+
dist

.eslintrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
env: {
3+
es2020: true,
4+
node: true,
5+
jest: true,
6+
},
7+
extends: ["eslint:recommended", "plugin:prettier/recommended"],
8+
parserOptions: {
9+
ecmaVersion: 11,
10+
sourceType: "module",
11+
},
12+
rules: {
13+
"prettier/prettier": [
14+
"error",
15+
{
16+
endOfLine: "auto",
17+
},
18+
],
19+
},
20+
};

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
node_js:
3+
- '12'
4+
before_script:
5+
- npm run lint
6+
script:
7+
- npm run test:ci
8+
deploy:
9+
provider: heroku
10+
app: authentication-microapi-v2
11+
on:
12+
branch: v2
13+
api_key:
14+
secure: UK+3xlbGNiVPV+Nqi4jvJgYtlceYeY/E0qFqxOuLJRKnYoOctOyLUI0b4HC1Oyqy+gQ48ncq41qbrQiAUadGS3FQUJdC7VIkHU0riCar1b6cbSHNVNadMxQWwuI0gtk2FVqgkqvbGge/zX7/J/C/eISN6pLUgQ4KJTPNbOo9dTug4oPneiuyswl8rGWRc2ImhyyBOj+FS3FgxZpxZHMGe2PRGJX0tZMSgdIlQjOFBfF5xhoUhrYx98duOzIWwOc8d6wwf8Zwmv1+Q8h+tlLYxgRYx9sj7qOfpNLv9FoL4MzcSQM9RBW7epvisQZfhv5TH7w0D/OnpRcIfHnnHkva02U4Gt92vNZJd/VRdQqJrmqOwoTNN1mKjt60W6rhgPWk2FlA4rUb4sIiSUAqHzGoXH/izNDsEcLXiYMQzWlExZH9F79vjVvFU/kIPCO5R/YGODFpM8Ahnam0fWCQPlGmSjX2lwWdI8/j6VFxbQwn9A1ffbew1xliq71IFU1Ug1eVqlwNqcAPmKCGriCHHP1uqV28ziPmLlValx0wY9VvoHlobeqwpZWYDq74jprV0UAmb5RlAdIeK7DztaCHFIpLRstYXekf10CRY40rnhanxNbBZ8qfMfg+Ozjdu+niMMZsi43JJttzoHF1z8kp437J8RPGoHK3wFdY2wu8f2sXz3k=

__test__/index.js

Whitespace-only changes.

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
"@babel/preset-env",
5+
{
6+
targets: {
7+
node: "current",
8+
},
9+
},
10+
],
11+
],
12+
};

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
moduleFileExtensions: ["js", "json"],
3+
testRegex: [".spec.js$", ".test.js$"],
4+
coverageDirectory: "./coverage",
5+
testEnvironment: "node",
6+
};

0 commit comments

Comments
 (0)