-
Notifications
You must be signed in to change notification settings - Fork 392
Applying Linter on Tests #201
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider adding lint:*:fix
too? 🙃
package.json
Outdated
@@ -7,12 +7,15 @@ | |||
"homepage": "https://firebase.google.com/", | |||
"scripts": { | |||
"build": "gulp build", | |||
"lint": "tslint --project tsconfig-lint.json --format stylish", | |||
"lint": "run-s lint:src lint:unit lint:integration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm-run-all
supports glob-like pattern matching, so you can do run-s lint:*
.
Why did you decide to run these in sequence instead of parallel?
@merlinnot What should Good idea to run the linter tasks in parallel. I'll make the change. |
Since {
"lint:unit:fix": "run-s \"lint:unit —fix\""
} One day we can even add precommit hooks on top of this, so it fixes everything before committing using husky and lint-staged, but that shouldn’t be a part of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
So far we haven't been linting our test sources. Now that we have upgraded to the latest version of tslint (#194), we should start linting our unit and integration tests. This PR adds the following npm tasks:
The aggregate task 'npm run lint
runs all of the above, which will run as part of
npm test` as well (this causes all lint jobs to run with CI).I also fixed all the existing lint errors in test files. I relaxed the linter rules a little bit for tests by introducing a separate
tslint-test.json
file.