2.0.0 (2020-04-02)
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.
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'
This file is no longer used, and can lead to confusion.
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"
}
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/
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.
Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up.
- add the eol-last rule (#425) (50ebd4d)
- allow eslintrc to run over tsx files (#469) (a21db94)
- disable global rule for checking TODO comments (#459) (96aa84a)
- override require-atomic-updates (#468) (8105c93)
- prefer single quotes if possible (#475) (39a2705)
- use eslint instead of tslint (#400) (b3096fb)
- use .prettierrc.js (#437) (06efa84)
- deps: update dependency chalk to v4 (#477) (061d64e)
- deps: update dependency eslint-plugin-node to v11 (#426) (a394b7c)
- deps: update dependency execa to v4 (#427) (f42ef36)
- deps: update dependency prettier to v2 (#464) (20ef43d)
- disable no-use-before-define (#431) (dea2c22)
- deps: update dependency update-notifier to v4 (#403) (57393b7)
- deps: upgrade to meow 6.x (#423) (8f93d00)
- align back to the google style guide (#440) (8bd78c4)
- disable empty-function check (#467) (6455d7a)
- drop support for node 8 (#422) (888c686)
- emit .prettierrc.js with init (#462) (b114614)
- enable trailing comma (#470) (6518f58)
- include *.tsx and *.jsx in default fix command (#473) (0509780)