Skip to content

Commit

Permalink
chore: remove unused deps and fix lint (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Nov 9, 2018
1 parent 50b2ffd commit bc2136d
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 15 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-videointelligence/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ system-test/secrets.js
system-test/*key.json
*.lock
package-lock.json
.vscode
8 changes: 3 additions & 5 deletions packages/google-cloud-videointelligence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,20 @@
"cover": "nyc --reporter=lcov mocha test/*.js && nyc report",
"docs": "jsdoc -c .jsdoc.js",
"generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json",
"lint": "eslint src/ samples/ test/",
"prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js",
"lint": "eslint '**/*.js'",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha system-test/*.js --timeout 600000",
"test-no-cover": "mocha test/*.js",
"test": "npm run cover"
"test": "npm run cover",
"fix": "eslint --fix '**/*.js'"
},
"dependencies": {
"extend": "^3.0",
"google-gax": "^0.20.0",
"lodash.merge": "^4.6.1",
"protobufjs": "^6.8.6"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^2.3.0",
"async": "^2.6.1",
"codecov": "^3.0.2",
"eslint": "^5.0.0",
"eslint-config-prettier": "^3.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/google-cloud-videointelligence/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "0.0.1",
"private": true,
"license": "Apache-2.0",
"files": [
"*.js",
"resources"
],
"author": "Google Inc.",
"repository": "googleapis/nodejs-video-intelligence",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
env:
mocha: true
rules:
no-undef: off
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
'use strict';

describe('VideoIntelligenceServiceSmokeTest', () => {
$unhandledCase: LongRunningOptionalArrayMethod$
LongRunningOptionalArrayMethod$;
});
3 changes: 1 addition & 2 deletions packages/google-cloud-videointelligence/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@

# Node.js specific cleanup
subprocess.run(["npm", "install"])
subprocess.run(["npm", "run", "prettier"])
subprocess.run(["npm", "run", "lint"])
subprocess.run(["npm", "run", "fix"])
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
env:
mocha: true
rules:
node/no-unpublished-require: off
no-console: off
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,21 @@ describe('VideoIntelligenceServiceSmokeTest', () => {
.annotateVideo(request)
.then(responses => {
const operation = responses[0];
const initialApiResponse = responses[1];

// Adding a listener for the "complete" event starts polling for the
// completion of the operation.
operation.on('complete', (result, metadata, finalApiResponse) => {
operation.on('complete', result => {
console.log(result);
});

// Adding a listener for the "progress" event causes the callback to be
// called on any change in metadata when the operation is polled.
operation.on('progress', (metadata, apiResponse) => {
operation.on('progress', metadata => {
console.log(metadata);
});

// Adding a listener for the "error" event handles any errors found during polling.
operation.on('error', err => {
operation.on('error', () => {
// throw(err);
});
})
Expand Down
2 changes: 0 additions & 2 deletions packages/google-cloud-videointelligence/test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
env:
mocha: true
rules:
node/no-unpublished-require: off

0 comments on commit bc2136d

Please sign in to comment.