Skip to content

gts v2.0.0

Compare
Choose a tag to compare
@release-please release-please released this 10 Apr 02:01
326fc15

⚠ BREAKING CHANGES ⚠

This is a major rewrite of the tool. Based on community guidance, we've switched from using tslint to eslint. Please read all of the steps below to upgrade.

Configuring eslint

With the shift to eslint, gts now will format and lint JavaScript as well as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run:

$ npx gts fix

To specify only TypeScript:

$ npx gts fix '**/*.ts'

Delete tslint.json

This file is no longer used, and can lead to confusion.

Create a .eslintrc.json

Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named .eslintrc.json, and paste the following:

{
  "extends": "./node_modules/gts"
}

Create a .eslintignore

The .eslintignore file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's really important to ignore your build directory! Here is an example of a .eslintignore file:

**/node_modules
build/

Create a .prettierrc.js

The formatting rules in gts need to be extended. Create a file named .prettierrc.js, and add the following:

module.exports = {
  ...require('gts/.prettierrc.json')
}

Rule changes

The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out .eslintrc.json.

Require Node.js 10.x and up

Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up.

Features

Bug Fixes