Skip to content

Commit 44fd4fc

Browse files
committed
add jest and eslint, stub in index.js
1 parent eea872b commit 44fd4fc

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

Diff for: .eslintrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "airbnb",
3+
"env": {
4+
"jest": true
5+
}
6+
}

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
coverage

Diff for: index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hi');

Diff for: package.json

+25-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,22 @@
44
"description": "Universal JS client for micro-rpc",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"start": "node .",
8+
"lint": "eslint . --ignore-pattern coverage node_modules",
9+
"test": "npm run lint && jest --coverage",
10+
"test-watch": "jest --watch",
11+
"test-update": "jest -u"
12+
},
13+
"jest": {
14+
"verbose": true,
15+
"coverageThreshold": {
16+
"global": {
17+
"branches": 100,
18+
"functions": 100,
19+
"lines": 100,
20+
"statements": 100
21+
}
22+
}
823
},
924
"repository": {
1025
"type": "git",
@@ -19,5 +34,13 @@
1934
"bugs": {
2035
"url": "https://github.com/bufferapp/micro-rpc-client/issues"
2136
},
22-
"homepage": "https://github.com/bufferapp/micro-rpc-client#readme"
37+
"homepage": "https://github.com/bufferapp/micro-rpc-client#readme",
38+
"devDependencies": {
39+
"eslint": "^3.19.0",
40+
"eslint-config-airbnb": "^14.1.0",
41+
"eslint-plugin-import": "^2.2.0",
42+
"eslint-plugin-jsx-a11y": "^4.0.0",
43+
"eslint-plugin-react": "^6.10.3",
44+
"jest": "^19.0.2"
45+
}
2346
}

0 commit comments

Comments
 (0)