Skip to content

Commit

Permalink
chore: update lint configs (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Nov 6, 2018
1 parent e7d93dd commit e4fe6a4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
6 changes: 3 additions & 3 deletions packages/google-cloud-vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,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 smoke-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/promisify": "^0.3.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-vision/samples/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
rules:
no-console: off


node/no-missing-require: off
2 changes: 0 additions & 2 deletions packages/google-cloud-vision/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
"private": true,
"license": "Apache-2.0",
"author": "Google Inc.",
"repository": "googleapis/nodejs-vision",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "ava -T 1m --verbose system-test/*.test.js"
},
"dependencies": {

"@google-cloud/automl": "^0.1.1",
"@google-cloud/vision": "^0.22.0",
"async": "^2.6.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-vision/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
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ describe('ImageAnnotatorSmokeTest', () => {
features: features,
};
const requests = [requestsElement];
client.batchAnnotateImages({requests: requests})
client
.batchAnnotateImages({requests: requests})
.then(responses => {
const response = responses[0];
console.log(response);
Expand Down
17 changes: 6 additions & 11 deletions packages/google-cloud-vision/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,18 @@

logging.basicConfig(level=logging.DEBUG)

# Run the gapic generator
gapic = gcp.GAPICGenerator()
common_templates = gcp.CommonTemplates()


versions = ['v1', 'v1p1beta1', 'v1p2beta1', 'v1p3beta1']

for version in versions:
library = gapic.node_library('vision', version)
s.copy(library, excludes=['src/index.js', 'README.md', 'package.json'])

templates = common_templates.node_library(package_name="@google-cloud/vision")
# Copy common templates
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)


'''
Node.js specific cleanup
'''
# Node.js specific cleanup
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'prettier'])
subprocess.run(['npm', 'run', 'lint'])
subprocess.run(['npm', 'run', 'fix'])
2 changes: 0 additions & 2 deletions packages/google-cloud-vision/system-test/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
env:
mocha: true
rules:
node/no-unpublished-require: off
no-console: off
node/no-deprecated-api: off
3 changes: 0 additions & 3 deletions packages/google-cloud-vision/test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
---
env:
mocha: true
rules:
node/no-unpublished-require: off
node/no-deprecated-api: off

0 comments on commit e4fe6a4

Please sign in to comment.