Skip to content

Commit

Permalink
docs: removes broken dependency status and markdown format (#860)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Fenster <fenster@google.com>
  • Loading branch information
tonycoco and alexander-fenster committed Mar 21, 2024
1 parent b17994d commit ac9500b
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
# gts

> Google TypeScript Style
[![NPM Version][npm-image]][npm-url]
[![GitHub Actions][github-image]][github-url]
[![Dependency Status][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![codecov][codecov-image]][codecov-url]
[![TypeScript Style Guide][gts-image]][gts-url]

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

To borrow from [standardjs][standardjs-url]:

- **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.
- **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][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code.

## Getting Started

The easiest way to get started is to run:

```sh
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`:
Expand All @@ -38,7 +42,8 @@ When you run the `npx gts init` command, it's going to do a few things for you:
- 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:

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

```sh
gts lint index.ts
Expand All @@ -47,6 +52,7 @@ gts lint *.ts
```

### Working with eslint

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

```yml
Expand All @@ -62,10 +68,11 @@ $ eslint --fix
```

This opens the ability to use the vast `eslint` ecosystem including custom rules, and tools like the VSCode plugin for eslint:
- https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

- https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

## Badge

Show your love for `gts` and include a badge!

[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)
Expand All @@ -75,6 +82,7 @@ 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?
Expand All @@ -90,12 +98,14 @@ repos:
```

## License

[Apache-2.0](LICENSE)

---

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

> ***NOTE: This is not an official Google product.***
> **_NOTE: This is not an official Google product._**
[github-image]: https://github.com/google/gts/workflows/ci/badge.svg
[github-url]: https://github.com/google/gts/actions
Expand Down

0 comments on commit ac9500b

Please sign in to comment.