All Projects → google → Gts

google / Gts

Licence: apache-2.0
☂️ TypeScript style guide, formatter, and linter.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gts

Format Graphql
Formats GraphQL schema definition language (SDL) document.
Stars: ✭ 55 (-98.52%)
Mutual labels:  linter, formatter
Poetic
Automatically install and maintain ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.
Stars: ✭ 165 (-95.56%)
Mutual labels:  linter, formatter
Psscriptanalyzer
Download ScriptAnalyzer from PowerShellGallery
Stars: ✭ 1,137 (-69.39%)
Mutual labels:  linter, formatter
Isort
A Python utility / library to sort imports.
Stars: ✭ 4,377 (+17.85%)
Mutual labels:  linter, formatter
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (-99.22%)
Mutual labels:  formatter, linter
Verible
Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, and formatter.
Stars: ✭ 384 (-89.66%)
Mutual labels:  linter, formatter
Drstring
DrString finds issues in your Swift docstrings and fixes them for you.
Stars: ✭ 133 (-96.42%)
Mutual labels:  linter, formatter
Unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 96 (-97.42%)
Mutual labels:  linter, formatter
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (-99.62%)
Mutual labels:  formatter, linter
Best Of Python Dev
🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.
Stars: ✭ 243 (-93.46%)
Mutual labels:  linter, formatter
Autoflake
Removes unused imports and unused variables as reported by pyflakes
Stars: ✭ 362 (-90.25%)
Mutual labels:  linter, formatter
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-99.54%)
Mutual labels:  formatter, linter
Yapf
A formatter for Python files
Stars: ✭ 12,203 (+228.57%)
Mutual labels:  google, formatter
Eryngii
[WIP] Erlang lint and formatter
Stars: ✭ 28 (-99.25%)
Mutual labels:  linter, formatter
Godot Gdscript Toolkit
Independent set of GDScript tools - parser, linter and formatter
Stars: ✭ 214 (-94.24%)
Mutual labels:  linter, formatter
lancer
Turn your python code into a hideous mess. Ever heard of Black? This is the opposite.
Stars: ✭ 179 (-95.18%)
Mutual labels:  formatter, linter
unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 119 (-96.8%)
Mutual labels:  formatter, linter
Bandit
Bandit is a tool designed to find common security issues in Python code.
Stars: ✭ 3,763 (+1.32%)
Mutual labels:  linter
Awesome Privacy
A curated list of services and alternatives that respect your privacy because PRIVACY MATTERS.
Stars: ✭ 303 (-91.84%)
Mutual labels:  google
Laravel Socialite
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban
Stars: ✭ 296 (-92.03%)
Mutual labels:  google

gts

Google TypeScript Style

NPM Version GitHub Actions Dependency Status 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 .eslintrc in your project directory, and extend the shared config:

---
extends:
  - './node_modules/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.

License

Apache-2.0


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

NOTE: This is not an official Google product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].