{"id":13433247,"url":"https://github.com/google/gts","last_synced_at":"2025-05-13T17:04:24.799Z","repository":{"id":38297664,"uuid":"98927279","full_name":"google/gts","owner":"google","description":"☂️ TypeScript style guide, formatter, and linter.  ","archived":false,"fork":false,"pushed_at":"2024-10-25T01:05:36.000Z","size":4143,"stargazers_count":5163,"open_issues_count":53,"forks_count":210,"subscribers_count":43,"default_branch":"main","last_synced_at":"2025-05-06T16:09:57.938Z","etag":null,"topics":["formatter","google","linter","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/google/gts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-31T20:32:29.000Z","updated_at":"2025-05-06T11:56:53.000Z","dependencies_parsed_at":"2024-01-10T20:11:32.192Z","dependency_job_id":"5dc7eb4c-c994-4c73-9e76-2e9ffaed3509","html_url":"https://github.com/google/gts","commit_stats":{"total_commits":495,"total_committers":37,"mean_commits":"13.378378378378379","dds":0.6484848484848484,"last_synced_commit":"3b9ab6dd59691f77f5c5c632a44c6762ba4ef7c6"},"previous_names":["google/ts-style"],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fgts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/gts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990457,"owners_count":21995773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatter","google","linter","typescript"],"created_at":"2024-07-31T02:01:23.052Z","updated_at":"2025-05-13T17:04:24.778Z","avatar_url":"https://github.com/google.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","google"],"sub_categories":[],"readme":"# gts\n\n\u003e Google TypeScript Style\n\n[![NPM Version][npm-image]][npm-url]\n[![GitHub Actions][github-image]][github-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![codecov][codecov-image]][codecov-url]\n[![TypeScript Style Guide][gts-image]][gts-url]\n\n[gts][npm-url] is Google's TypeScript style guide, and the configuration for our formatter, linter, and automatic code fixer. No lint rules to edit, no configuration to update, no more bike shedding over syntax.\n\nTo borrow from [standardjs][standardjs-url]:\n\n- **No configuration**. The easiest way to enforce consistent style in your project. Just drop it in.\n- **Automatically format code**. Just run `gts fix` and say goodbye to messy or inconsistent code.\n- **Catch style issues \u0026 programmer errors early**. Save precious code review time by eliminating back-and-forth between reviewer \u0026 contributor.\n- **Opinionated, but not to a fault**. We recommend you use the default configuration, but if you _need_ to customize compiler or linter config, you can.\n\nUnder the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code.\n\n## Getting Started\n\nThe easiest way to get started is to run:\n\n```sh\nnpx gts init\n```\n\n## How it works\n\nWhen you run the `npx gts init` command, it's going to do a few things for you:\n\n- Adds an opinionated `tsconfig.json` file to your project that uses the Google TypeScript Style.\n- Adds the necessary devDependencies to your `package.json`.\n- Adds scripts to your `package.json`:\n  - `lint`: Lints and checks for formatting problems.\n  - `fix`: Automatically fixes formatting and linting problems (if possible).\n  - `clean`: Removes output files.\n  - `compile`: Compiles the source code using TypeScript compiler.\n  - `pretest`, `posttest` and `prepare`: convenience integrations.\n- If a source folder is not already present it will add a default template project.\n\n### Individual files\n\nThe commands above will all run in the scope of the current folder. Some commands can be run on individual files:\n\n```sh\ngts lint index.ts\ngts lint one.ts two.ts three.ts\ngts lint *.ts\n```\n\n### Working with eslint\n\nUnder the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `.eslintrc` in your project directory, and extend the shared config:\n\n```yml\n---\nextends:\n  - './node_modules/gts'\n```\n\nIf you don't want to use the `gts` CLI, you can drop down to using the module as a basic `eslint` config, and just use the `eslint` cli:\n\n```\n$ eslint --fix\n```\n\nThis opens the ability to use the vast `eslint` ecosystem including custom rules, and tools like the VSCode plugin for eslint:\n\n- https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint\n\n## Badge\n\nShow your love for `gts` and include a badge!\n\n[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)\n\n```md\n[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)\n```\n\n## Supported Node.js Versions\n\nOur 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.\n\n## Can I use *gts* with the [pre-commit](https://pre-commit.com/) framework?\n\nYes! You can put the following in your `.pre-commit-config.yaml` file:\n\n```yaml\nrepos:\n  - repo: https://github.com/google/gts\n    rev: '' # Use the sha / tag you want to point at\n    hooks:\n      - id: gts\n```\n\n## License\n\n[Apache-2.0](LICENSE)\n\n---\n\nMade with ❤️ by the Google Node.js team.\n\n\u003e **_NOTE: This is not an official Google product._**\n\n[github-image]: https://github.com/google/gts/workflows/ci/badge.svg\n[github-url]: https://github.com/google/gts/actions\n[prettier-url]: https://prettier.io/\n[codecov-image]: https://codecov.io/gh/google/gts/branch/main/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/google/gts\n[david-image]: https://david-dm.org/google/gts.svg\n[david-url]: https://david-dm.org/google/gts\n[gts-image]: https://img.shields.io/badge/code%20style-google-blueviolet.svg\n[gts-url]: https://github.com/google/gts\n[npm-image]: https://img.shields.io/npm/v/gts.svg\n[npm-url]: https://npmjs.org/package/gts\n[snyk-image]: https://snyk.io/test/github/google/gts/badge.svg\n[snyk-url]: https://snyk.io/test/github/google/gts\n[standardjs-url]: https://www.npmjs.com/package/standard\n[eslint-url]: https://eslint.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fgts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fgts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fgts/lists"}