Skip to content

chore: Add lint rules #1003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

chore: Add lint rules #1003

wants to merge 1 commit into from

Conversation

grant
Copy link
Contributor

@grant grant commented Feb 14, 2018

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

Successful lint

$ npm run lint

> [email protected] lint /github/google/google-api-nodejs-client
> tslint -p . -c tslint.json
$ ...

Example erred lint

$ npm run lint

> [email protected] 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! [email protected] lint: `tslint -p . -c tslint.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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
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
Copy link
Contributor Author

grant commented Feb 14, 2018

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