Skip to content

Commit aa2637d

Browse files
committedJun 15, 2019
ci: remove node 6 support and add linting in travis
1 parent 801291b commit aa2637d

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed
 

‎.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ sudo: required
33
language: node_js
44

55
node_js:
6-
- 6
76
- 8
87
- 10
98
- 12
@@ -23,9 +22,9 @@ before_script:
2322
- docker ps -a
2423

2524
script:
26-
# - npm run lint
25+
- yarn lint
2726
# turn off lint for the moment
28-
- MONGODB_URL=mongodb://localhost/connect-mongo-test travis_retry npm test
27+
- MONGODB_URL=mongodb://localhost/connect-mongo-test travis_retry yarn test
2928

3029
after_success:
31-
- npm install coveralls -g && npm run cover | coveralls
30+
- npm install coveralls -g && yarn cover | coveralls

‎commitlint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] }

‎package.json

+12
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,17 @@
5151
"lint:fix": "eslint src test --fix",
5252
"cover": "nyc report --reporter=text-lcov",
5353
"test": "nyc mocha"
54+
},
55+
"husky": {
56+
"hooks": {
57+
"pre-commit": "lint-staged",
58+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
59+
}
60+
},
61+
"lint-staged": {
62+
"*.js": [
63+
"eslint --fix",
64+
"git add"
65+
]
5466
}
5567
}

0 commit comments

Comments
 (0)
Please sign in to comment.