From c7b1e7999d463575b1a4758a36cea43e1db44987 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 8 Nov 2018 21:18:00 -0800 Subject: [PATCH] chore: update lint rules --- package.json | 10 ++++------ samples/system-test/.eslintrc.yml | 5 ----- synth.py | 13 ++++--------- system-test/.eslintrc.yml | 1 - test/.eslintrc.yml | 2 -- 5 files changed, 8 insertions(+), 23 deletions(-) delete mode 100644 samples/system-test/.eslintrc.yml diff --git a/package.json b/package.json index e859b47f..f9640c0f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=4.0.0" + "node": ">=6.0.0" }, "repository": "googleapis/nodejs-kms", "main": "src/index.js", @@ -38,11 +38,10 @@ "cover": "nyc --reporter=lcov mocha test/*.js && nyc report", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "test-no-cover": "mocha test/ --timeout 600000", - "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'", "docs": "jsdoc -c .jsdoc.js", "system-test": "mocha system-test/ smoke-test/ --timeout 600000", - "fix": "eslint '**/*.js' --fix && npm run prettier" + "fix": "eslint '**/*.js' --fix" }, "dependencies": { "google-gax": "^0.20.0", @@ -61,7 +60,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" } } diff --git a/samples/system-test/.eslintrc.yml b/samples/system-test/.eslintrc.yml deleted file mode 100644 index c0289282..00000000 --- a/samples/system-test/.eslintrc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -rules: - node/no-unpublished-require: off - node/no-unsupported-features: off - no-empty: off diff --git a/synth.py b/synth.py index 63d3d940..03bf4501 100644 --- a/synth.py +++ b/synth.py @@ -22,26 +22,21 @@ logging.basicConfig(level=logging.DEBUG) gapic = gcp.GAPICGenerator() -common_templates = gcp.CommonTemplates() - version = 'v1' - library = gapic.node_library( 'kms', version, config_path='artman_cloudkms.yaml') - # skip index, package.json, and README.md s.copy( library, excludes=['package.json', 'README.md', 'src/index.js'], ) -templates = common_templates.node_library(package_name="@google-cloud/kms") +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() s.copy(templates) -# # Node.js specific cleanup -# subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'prettier']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) diff --git a/system-test/.eslintrc.yml b/system-test/.eslintrc.yml index 2e6882e4..f9605165 100644 --- a/system-test/.eslintrc.yml +++ b/system-test/.eslintrc.yml @@ -2,5 +2,4 @@ env: mocha: true rules: - node/no-unpublished-require: off no-console: off diff --git a/test/.eslintrc.yml b/test/.eslintrc.yml index 73f7bbc9..6db2a46c 100644 --- a/test/.eslintrc.yml +++ b/test/.eslintrc.yml @@ -1,5 +1,3 @@ --- env: mocha: true -rules: - node/no-unpublished-require: off