Volver al ranking

google/gts

TypeScriptgithub.com/google/gts

☂️ TypeScript style guide, formatter, and linter.

typescriptlinterformattergoogle
Crecimiento de estrellas
Estrellas
5.3k
Forks
210
Crecimiento semanal
Issues
39
2k4k
ene 2023mar 2024may 2025jul 2026
Artefactosnpmnpm install gts
README

gts

Google TypeScript Style

NPM Version GitHub Actions Known Vulnerabilities codecov TypeScript Style Guide

gts 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.

To borrow from standardjs:

  • No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
  • Automatically format code. Just run gts fix and say goodbye to messy or inconsistent code.
  • Catch style issues & programmer errors early. Save precious code review time by eliminating back-and-forth between reviewer & contributor.
  • 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.

Under the covers, we use eslint to enforce the style guide and provide automated fixes, and prettier to re-format code.

Getting Started

The easiest way to get started is to run:

npx gts init

How it works

When you run the npx gts init command, it's going to do a few things for you:

  • Adds an opinionated tsconfig.json file to your project that uses the Google TypeScript Style.
  • Adds the necessary devDependencies to your package.json.
  • Adds scripts to your package.json:
    • lint: Lints and checks for formatting problems.
    • fix: Automatically fixes formatting and linting problems (if possible).
    • clean: Removes output files.
    • compile: Compiles the source code using TypeScript compiler.
    • pretest, posttest and prepare: convenience integrations.
  • If a source folder is not already present it will add a default template project.

Individual files

The commands above will all run in the scope of the current folder. Some commands can be run on individual files:

gts lint index.ts
gts lint one.ts two.ts three.ts
gts lint *.ts

Working with eslint

Under the covers, we use eslint to enforce the style guide and provide automated fixes, and prettier to re-format code. To use the shared eslint configuration, create an eslint.config.js in your project directory, and extend the shared config:

module.exports = [
  ...require('gts'),
];

If 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:

$ eslint --fix

This opens the ability to use the vast eslint ecosystem including custom rules, and tools like the VSCode plugin for eslint:

Badge

Show your love for gts and include a badge!

Code Style: Google

[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.

Can I use gts with the pre-commit framework?

Yes! You can put the following in your .pre-commit-config.yaml file:

repos:
  - repo: https://github.com/google/gts
    rev: '' # Use the sha / tag you want to point at
    hooks:
      - id: gts

License

Apache-2.0


Made with ❤️ by the Google Node.js team.

NOTE: This is not an official Google product.

Repositorios relacionados
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

TypeScriptnpmOtherautomationipaas
n8n.io
197.2k59.5k
microsoft/vscode

Visual Studio Code

TypeScriptnpmMIT Licenseeditorelectron
code.visualstudio.com
187.8k41.3k
f/prompts.chat

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

HTMLOtherchatgptai
prompts.chat
166.1k21.5k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.2k23.6k
farion1231/cc-switch

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io

Rustcrates.ioMIT Licenseai-toolsclaude-code
ccswitch.io
119.4k8k
microsoft/TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TypeScriptnpmApache License 2.0typescriptjavascript
typescriptlang.org
109.9k13.6k
immich-app/immich

High performance self-hosted photo and video management solution.

TypeScriptnpmGNU Affero General Public License v3.0backup-toolmobile-app
immich.app
108.3k6.3k
denoland/deno

A modern runtime for JavaScript and TypeScript.

Rustcrates.ioMIT Licensedenotypescript
deno.com
107.8k6.2k
angular/angular

Deliver web apps with confidence 🚀

TypeScriptnpmMIT Licenseangulartypescript
angular.dev
100.6k27.5k
ant-design/ant-design

An enterprise-class UI design language and React UI library

TypeScriptnpmMIT Licensereactui-kit
ant.design
98.8k54.7k
oven-sh/bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

Rustcrates.ioOtherbunbundler
bun.com
94.9k4.9k
storybookjs/storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

TypeScriptnpmMIT Licensestorybookstyleguide
storybook.js.org
90.6k10.2k