Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: use eslint instead of tslint #400

Merged
merged 3 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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