Skip to content

Commit

Permalink
feat!: use eslint instead of tslint (#400)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Switch from tslint to eslint. This will impact all lint rules, and tslint specific configuration.
  • Loading branch information
JustinBeckwith authored Jan 13, 2020
1 parent b245439 commit b3096fb
Show file tree
Hide file tree
Showing 24 changed files with 1,119 additions and 1,753 deletions.
12 changes: 10 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
container:
image: node:10
image: node:12

windows_task:
windows_container:
Expand All @@ -16,11 +16,19 @@ lint_task:
install_script: npm ci
test_script: npm run lint

license_task:
install_script: npm ci
test_script: npm run license-check

system_test_task:
install_script: npm ci
test_script: npm run system-test

test_task:
container:
matrix:
image: node:13
image: node:12
image: node:11
image: node:10
image: node:8
install_script: npm ci
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
test/fixtures/
42 changes: 42 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"extends": [
"eslint:recommended",
"plugin:node/recommended",
"prettier"
],
"plugins": [
"node",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"block-scoped-var": "error",
"eqeqeq": "error",
"no-warning-comments": "warn",
"no-var": "error",
"prefer-const": "error"
},
"overrides": [
{
"files": "**/*.ts",
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"node/no-missing-import": "off",
"node/no-unsupported-features/es-syntax": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/camelcase": "off",
"node/no-missing-require": "off",
"no-dupe-class-members": "off",
"node/shebang": "off"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
}
}
]
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To borrow from [standardjs][standardjs-url]:
- **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 [tslint][tslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code.
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

Expand Down Expand Up @@ -77,4 +77,4 @@ Made with ❤️ by the Google Node.js team.
[snyk-image]: https://snyk.io/test/github/google/gts/badge.svg
[snyk-url]: https://snyk.io/test/github/google/gts
[standardjs-url]: https://www.npmjs.com/package/standard
[tslint-url]: https://palantir.github.io/tslint/
[eslint-url]: https://eslint.org/
Binary file added gts-1.1.2.tgz
Binary file not shown.
Loading

0 comments on commit b3096fb

Please sign in to comment.