From 54f326a1e582061eefe553deed2c3657ee4c91db Mon Sep 17 00:00:00 2001 From: Tony Coconate Date: Thu, 21 Mar 2024 10:44:45 -0500 Subject: [PATCH] feat: adding pre-commit-hooks.yaml --- .pre-commit-hooks.yaml | 9 +++++++++ README.md | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .pre-commit-hooks.yaml 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)