Skip to content

Commit 2a4bd82

Browse files
committed
Bootstrap project
1 parent 0985288 commit 2a4bd82

9 files changed

+5637
-0
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# For more info on EditorConfig, visit http://editorconfig.org/
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_size = 2
9+
indent_style = space
10+
trim_trailing_whitespace = true

.gitignore

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
dist
2+
docs
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
*.pid.lock
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Coverage directory used by tools like istanbul
21+
coverage
22+
23+
# nyc test coverage
24+
.nyc_output
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# node-waf configuration
33+
.lock-wscript
34+
35+
# Compiled binary addons (https://nodejs.org/api/addons.html)
36+
build/Release
37+
38+
# Dependency directories
39+
node_modules/
40+
jspm_packages/
41+
42+
# TypeScript v1 declaration files
43+
typings/
44+
45+
# Optional npm cache directory
46+
.npm
47+
48+
# Optional eslint cache
49+
.eslintcache
50+
51+
# Optional REPL history
52+
.node_repl_history
53+
54+
# Output of 'npm pack'
55+
*.tgz
56+
57+
# Yarn Integrity file
58+
.yarn-integrity
59+
60+
# dotenv environment variables file
61+
.env
62+
63+
# next.js build output
64+
.next

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: node_js
2+
cache: yarn
3+
matrix:
4+
include:
5+
- node_js: '6'
6+
- node_js: '8'
7+
env: RUN_SNYK=true
8+
- node_js: '10'
9+
- node_js: node
10+
script:
11+
- yarn lint
12+
- yarn test --coverage
13+
- yarn prettier:ci
14+
- yarn build
15+
before_install:
16+
- if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then npm install -g snyk; fi
17+
install:
18+
- if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then snyk test --org=maxmind; fi
19+
- yarn install
20+
after_success:
21+
- if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' && $RUN_SNYK
22+
&& $SNYK_TOKEN ]]; then snyk monitor --org=maxmind --project-name=maxmind/minfraud-api-node;
23+
fi
24+
env:
25+
global:
26+
- secure: ipodXeXrOeXiB/S6sW393k6EoA7uxsSwgpfh7E+7RCEJ84OkBvA8LuTIHflyfLFvthPbrBBbYvXBPIjmZ70AWG3IQu7E9lgegUylIIF6LGdcOC+hUctq5y3xx1AKzbxt3tZm7KGjSefw0bgH3YHhHhj1rfTUsJSSYjwH1pagH8WUmZoF6PGop1kxzz8igdCJ+pkHQslL0vl3rEfQUTYDWD5f3D380xZj5sBfpqibUqL0YHwMcKaO0dvj03q2ZLGcd16A308Fr2WV88BmrawC2tfYzD4FFUn1ISGfszfKahJDTFuj6DvnIgAItFgHRGuRDvj4x2hlB3xuwUdy5MKRcEy0x2L4XOlEnrdzrRWBkXsrlTF9C97afHcAsA9O6Iuv2KMZ7VbzqlDujetfylgqaLGPfseE5T3pohljzhwvm4xLR8JlzCwoJFDp+ukuTd6A9eETlBpvJX2rTyA9tcgMdwADsCUmUFn1wVlcVP4u4Dwu0aEMsvAYnyT2tbW+XBHSFMo0wu1Pl+bi06eKxd4fW1vdZS9EGtlCA2kDmQmUDfgjbeArpDtJ2pwowencU6F69BwzLMwILSdbt3gjcuQ/c+wqj4P55xVNoVS5mKeivTJJ2P96nEUWC2cZikJ/IpFk6mg6TaGhpZpT1GESv1GYKxG/G7yinrQGXoilPKxfdLY=

jest.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
coverageThreshold: {
3+
global: {
4+
branches: 100,
5+
functions: 100,
6+
lines: 100,
7+
statements: 0,
8+
}
9+
},
10+
roots: ['<rootDir>/src', '<rootDir>/__mocks__'],
11+
transform: {
12+
'^.+\\.tsx?$': 'ts-jest',
13+
},
14+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
15+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
16+
};

package.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "@maxmind/minfraud-api-node",
3+
"version": "0.0.0",
4+
"description": "Node.js API for MaxMind minFraud Score, Insights, and Factors web services",
5+
"main": "dist/index.js",
6+
"homepage": "https://github.com/maxmind/minfraud-api-node",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/maxmind/minfraud-api-node.git"
10+
},
11+
"author": "MaxMind",
12+
"license": "Apache-2.0",
13+
"private": false,
14+
"keywords": [
15+
"maxmind",
16+
"minfraud",
17+
"minfraud score",
18+
"minfraud insights",
19+
"minfraud factors"
20+
],
21+
"files": ["dist"],
22+
"types": "dist/index.d.ts",
23+
"devDependencies": {
24+
"@types/jest": "^23.3.5",
25+
"@types/nock": "^9.3.0",
26+
"@types/node": "^10.11.6",
27+
"gh-pages": "^2.0.1",
28+
"husky": "^1.1.1",
29+
"jest": "^23.6.0",
30+
"lint-staged": "^7.3.0",
31+
"nock": "^10.0.4",
32+
"np": "^3.0.4",
33+
"prettier": "^1.14.3",
34+
"ts-jest": "^23.10.4",
35+
"tslint": "^5.11.0",
36+
"tslint-config-prettier": "^1.15.0",
37+
"tslint-eslint-rules": "^5.4.0",
38+
"typedoc": "^0.13.0",
39+
"typescript": "^3.1.2"
40+
},
41+
"husky": {
42+
"hooks": {
43+
"pre-commit": "lint-staged"
44+
}
45+
},
46+
"lint-staged": {
47+
"*.json": ["prettier --parser json --write", "git add"],
48+
"*.ts": [
49+
"prettier --parser typescript --single-quote true --trailing-comma es5 --write",
50+
"tslint -p tsconfig.lint.json -t stylish",
51+
"git add"
52+
]
53+
},
54+
"publishConfig": {
55+
"access": "public"
56+
},
57+
"scripts": {
58+
"build": "rimraf dist && tsc",
59+
"build:docs": "rimraf docs && typedoc --out docs --exclude \"**/*.spec.ts\" --mode file --readme README.md",
60+
"deploy:docs": "gh-pages -d docs",
61+
"lint": "tslint -p ./tsconfig.lint.json -t stylish",
62+
"prettier:ts": "prettier --parser typescript --single-quote true --trailing-comma es5 --write 'src/**/*.ts'",
63+
"prettier:ci": "prettier --parser typescript --single-quote true --trailing-comma es5 --list-different 'src/**/*.ts'",
64+
"prettier:json": "prettier --parser json --write '**/*.json'",
65+
"release": "yarn build && np",
66+
"test": "jest",
67+
"test:watch": "jest --watch",
68+
"version": "yarn build:docs && yarn deploy:docs"
69+
},
70+
"dependencies": {}
71+
}

tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"allowUnreachableCode": true,
4+
"baseUrl": ".",
5+
"allowJs": false,
6+
"declaration": true,
7+
"lib": ["es2015", "es2016", "es2017"],
8+
"module": "commonjs",
9+
"outDir": "dist",
10+
"pretty": true,
11+
"removeComments": true,
12+
"resolveJsonModule": true,
13+
"skipLibCheck": true,
14+
"sourceMap": false,
15+
"strict": true,
16+
"target": "es6"
17+
},
18+
"compileOnSave": false,
19+
"include": ["src"],
20+
"exclude": ["**/*.spec.ts"]
21+
}

tsconfig.lint.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"allowUnreachableCode": true,
4+
"baseUrl": ".",
5+
"allowJs": false,
6+
"declaration": true,
7+
"lib": ["es2015", "es2016", "es2017"],
8+
"module": "commonjs",
9+
"outDir": "dist",
10+
"pretty": true,
11+
"removeComments": true,
12+
"resolveJsonModule": true,
13+
"skipLibCheck": true,
14+
"sourceMap": false,
15+
"strict": true,
16+
"target": "es6"
17+
},
18+
"compileOnSave": false,
19+
"include": ["src"]
20+
}

tslint.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"extends": [
3+
"tslint:recommended",
4+
"tslint-eslint-rules",
5+
"tslint-config-prettier"
6+
],
7+
"rules": {
8+
"interface-name": [true, "never-prefix"],
9+
"jsdoc-format": false,
10+
"variable-name": [
11+
true,
12+
"ban-keywords",
13+
"check-format",
14+
"allow-snake-case",
15+
"allow-pascal-case"
16+
]
17+
},
18+
"linterOptions": {
19+
"exclude": ["*.json", "**/*.json"]
20+
}
21+
}

0 commit comments

Comments
 (0)