Skip to content

chore: Add lint rules - #1003

Closed
grant wants to merge 1 commit into
googleapis:masterfrom
grant:master
Closed

grant wants to merge 1 commit into
googleapis:masterfrom
grant:master

Conversation

@grant

@grant grant commented Feb 14, 2018 •

Copy link
Copy Markdown
Contributor

Adds google/ts-style lint rules. See @JustinBeckwith's #503 (comment). Ref: #503

Successful lint

$ npm run lint

> googleapis@26.0.1 lint /github/google/google-api-nodejs-client
> tslint -p . -c tslint.json
$ ...

Example erred lint

$ npm run lint

> googleapis@26.0.1 lint /github/google/google-api-nodejs-client
> tslint -p . -c tslint.json


ERROR: /Users/username/github/google/google-api-nodejs-client/src/index.ts[19, 29]: Unnecessary semicolon
ERROR: /Users/username/github/google/google-api-nodejs-client/src/index.ts[19, 30]: Unnecessary semicolon

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! googleapis@26.0.1 lint: `tslint -p . -c tslint.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the googleapis@26.0.1 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2018-02-14T01_00_53_407Z-debug.log

Checks

  • npm test succeeds
  • Pull request has been squashed into 1 commit
  • I did NOT manually make changes to anything in apis/
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate JSDoc comments were updated in source code (if applicable)
  • Appropriate changes to readme/docs are included in PR

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 14, 2018
@JustinBeckwith

Copy link
Copy Markdown
Contributor

Greetings, and thanks for the PR! We already run lint as part of the gts check command that's already added. The linting is provided via tslint in this package:
https://www.npmjs.com/package/gts

@grant

grant commented Feb 14, 2018

Copy link
Copy Markdown
Contributor Author

Perhaps it could be checkboxed in the issue or added to PULL_REQUEST_TEMPLATE.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants