Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the linter #261

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"test-no-cover": "mocha test/*.js",
"test": "npm run cover",
"lint": "eslint src/ samples/ system-test/ test/",
"lint": "eslint '**/*.js'",
"prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-test/*/*.js",
"docs": "jsdoc -c .jsdoc.js",
"publish-module": "node ../../scripts/publish.js pubsub",
"fix": "eslint --fix '**/*.js' && npm run prettier",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json"
},
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions smoke-test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
env:
mocha: true
rules:
node/no-unpublished-require: off
no-console: off
3 changes: 1 addition & 2 deletions src/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,10 @@ class ConnectionPool extends EventEmitter {
}
let elapsedTimeWithoutConnection = 0;
const now = Date.now();
let deadline;
if (this.noConnectionsTime) {
elapsedTimeWithoutConnection = now - this.noConnectionsTime;
}
deadline = now + (MAX_TIMEOUT - elapsedTimeWithoutConnection);
const deadline = now + (MAX_TIMEOUT - elapsedTimeWithoutConnection);
client.waitForReady(deadline, err => {
this.isGettingChannelState = false;
if (err) {
Expand Down