Skip to content

Commit

Permalink
chore: do a little lint cleanup (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Nov 19, 2018
1 parent a1caa68 commit 3a58508
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 24 deletions.
3 changes: 0 additions & 3 deletions packages/google-cloud-asset/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
.coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
**/package-lock.json
.DS_Store
google-cloud-logging-winston-*.tgz
google-cloud-logging-bunyan-*.tgz
8 changes: 3 additions & 5 deletions packages/google-cloud-asset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,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",
"fix": "eslint --fix '**/*.js' && npm run prettier"
"fix": "eslint --fix '**/*.js'"
},
"dependencies": {
"google-gax": "^0.22.0",
Expand All @@ -58,7 +57,6 @@
"mocha": "^5.2.0",
"nyc": "^13.0.0",
"power-assert": "^1.6.0",
"prettier": "^1.13.7",
"through2": "^3.0.0"
"prettier": "^1.13.7"
}
}
1 change: 1 addition & 0 deletions packages/google-cloud-asset/samples/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
rules:
no-console: off
node/no-missing-require: off
6 changes: 2 additions & 4 deletions packages/google-cloud-asset/samples/system-test/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
rules:
node/no-unpublished-require: off
node/no-unsupported-features: off
no-empty: off
env:
mocha: true
13 changes: 5 additions & 8 deletions packages/google-cloud-asset/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,19 @@

logging.basicConfig(level=logging.DEBUG)

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

version = 'v1beta1'

library = gapic.node_library(
'asset', version, config_path="artman_cloudasset_v1beta1.yaml",
artman_output_name=f"asset-{version}")

# Copy common templates
common_templates = gcp.CommonTemplates()
s.copy(library, excludes=['src/index.js', 'README.md', 'package.json'])

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', 'fix'])
1 change: 0 additions & 1 deletion packages/google-cloud-asset/system-test/.eslintrc.yml
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
16 changes: 15 additions & 1 deletion packages/google-cloud-asset/system-test/no-tests.js
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
console.log('no tests yet');
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

console.log('no system tests 👻');
2 changes: 0 additions & 2 deletions packages/google-cloud-asset/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 3a58508

Please sign in to comment.