Skip to content

Commit 05f92f4

Browse files
committed
Adding coverage and linting dependencies.
1 parent f03e283 commit 05f92f4

File tree

5 files changed

+512
-18
lines changed

5 files changed

+512
-18
lines changed

.eslintignore

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

.eslintrc.js

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true
5+
},
6+
"parser": "babel-eslint",
7+
"extends": [
8+
"eslint:recommended"
9+
],
10+
"parserOptions": {
11+
"sourceType": "module"
12+
},
13+
"rules": {
14+
"indent": [
15+
"error",
16+
2,
17+
{ "SwitchCase": 1 }
18+
],
19+
"brace-style": [
20+
"error",
21+
"1tbs",
22+
{ "allowSingleLine": true }
23+
],
24+
"linebreak-style": [
25+
"error",
26+
"unix"
27+
],
28+
"quotes": [
29+
"error",
30+
"single"
31+
],
32+
"semi": [
33+
"error",
34+
"always"
35+
],
36+
"no-var": "error"
37+
}
38+
};

.travis.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
#
3+
# Travis CI config
4+
# https://docs.travis-ci.com/user/customizing-the-build/
5+
#
6+
7+
env:
8+
- COVERALLS_ENV=production
9+
10+
branches:
11+
only:
12+
- master
13+
14+
language: node_js
15+
16+
node_js:
17+
- "7"
18+
19+
cache:
20+
directories:
21+
- "node_modules"
22+
23+
script:
24+
- npm run lint
25+
- npm test

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "A React Native Job Queue",
55
"main": "index.js",
66
"scripts": {
7-
"test": "jest"
7+
"test": "./node_modules/.bin/jest --coverage && if [ \"$COVERALLS_ENV\" = \"production\" ]; then cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi",
8+
"lint": "eslint ."
89
},
910
"repository": {
1011
"type": "git",
@@ -29,8 +30,11 @@
2930
"realm": "^2.0.12"
3031
},
3132
"devDependencies": {
33+
"babel-eslint": "^8.0.3",
3234
"babel-jest": "^21.2.0",
3335
"babel-preset-react-native": "^4.0.0",
36+
"coveralls": "^3.0.0",
37+
"eslint": "^4.12.1",
3438
"jest": "^21.2.1",
3539
"should": "^13.1.3"
3640
}

0 commit comments

Comments
 (0)