diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 00000000..4c8810a2 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,9 @@ +- id: gts + name: gts + description: 'gts: TypeScript style guide, formatter, and linter.' + entry: gts lint + language: node + language_version: system + minimum_pre_commit_version: 2.9.2 + require_serial: true + types_or: [javascript, jsx, ts, tsx] diff --git a/README.md b/README.md index 67732088..8eff8482 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,18 @@ Show your love for `gts` and include a badge! ## Supported Node.js Versions Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +## Can I use *gts* with the [pre-commit](https://pre-commit.com/) framework? + +Yes! You can put the following in your `.pre-commit-config.yaml` file: + +```yaml +repos: + - repo: https://github.com/google/gts + rev: '' # Use the sha / tag you want to point at + hooks: + - id: gts +``` + ## License [Apache-2.0](LICENSE)