diff --git a/packages/google-cloud-node/package.json b/packages/google-cloud-node/package.json index 2a3238ce52c6..fa4bdab44757 100644 --- a/packages/google-cloud-node/package.json +++ b/packages/google-cloud-node/package.json @@ -68,12 +68,12 @@ "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/ system-test/ test/", - "prettier": "prettier --write src/*.js src/*/*.js samples/*.js samples/*/*.js test/*.js test/*/*.js system-test/*.js system-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": { "@google-cloud/common": "^0.26.0", diff --git a/packages/google-cloud-node/smoke-test/.eslintrc.yml b/packages/google-cloud-node/smoke-test/.eslintrc.yml new file mode 100644 index 000000000000..f9605165c0fb --- /dev/null +++ b/packages/google-cloud-node/smoke-test/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +env: + mocha: true +rules: + no-console: off diff --git a/packages/google-cloud-node/smoke-test/speech_smoke_test.js b/packages/google-cloud-node/smoke-test/speech_smoke_test.js index 1cbcef2d9abf..756f84f1a2e4 100644 --- a/packages/google-cloud-node/smoke-test/speech_smoke_test.js +++ b/packages/google-cloud-node/smoke-test/speech_smoke_test.js @@ -38,7 +38,8 @@ describe('SpeechSmokeTest', () => { config: config, audio: audio, }; - client.recognize(request) + client + .recognize(request) .then(responses => { const response = responses[0]; console.log(response); diff --git a/packages/google-cloud-node/synth.py b/packages/google-cloud-node/synth.py index d3c940feb0e2..eb4514464522 100644 --- a/packages/google-cloud-node/synth.py +++ b/packages/google-cloud-node/synth.py @@ -53,11 +53,10 @@ "") templates = common_templates.node_library() -# TODO: remove excludes once var's are converted to const/let -s.copy(templates, excludes=['.eslintrc.yml']) +s.copy(templates) # # Node.js specific cleanup # subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'prettier']) +subprocess.run(['npm', 'run', 'fix'])