-
Notifications
You must be signed in to change notification settings - Fork 889
Conversation
Thanks for your interest in palantir/tslint, @alexjurkiewicz! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
There may be some analogous updates from vvakame/typescript-formatter#95 that can be brought into this PR as well (changing language to node and updating the files regex). |
Generally tslint should be installed from NPM and not from the repository. Runnable |
@alexjurkiewicz can you provide an overview of how this works so that I don't have to comb through the pre-commit documentation? As @andy-hanson noted above, there are no ready-to-go Node.js executables checked in here on Github. |
Quick description of
This PR isn't quite correct, but the idea is |
Can pre-commit users pin to a specific version of TSLint or does it always use the HEAD of the default branch? |
The SHA key in the above snippet pins to a specific version of this repo's pre commit hooks file. If the file is periodically updated with the latest version of tslint as an additional dependency, users can pick a sha with the desired tslint version. Technically, you can also use a tag. So if you release tslint v13, before you tag the repo with v13, just update the pre commit file. Then users can specify this repo@v13 to get their desired version. |
Overview of change:
Adds a file so that tslint can be used natively with pre-commit. See pre-commit/pre-commit#521 for more discussion.
If this PR is accepted, I'll submit a PR to update the documentation on pre-commit's side.
CHANGELOG.md entry:
[enhancement] pre-commit support
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)