Skip to content

chore(lint): lint ts as well as js #1823

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

Merged
merged 1 commit into from
Aug 25, 2016
Merged

Conversation

filipesilva
Copy link
Contributor

@filipesilva filipesilva commented Aug 24, 2016

We weren't linting TS files as part of the CI, so a lot of linting errors were going unnoticed.

"lint": "eslint ."
"lint-js": "eslint .",
"lint-ts": "tslint \"**/*.ts\" -c tslint.json -e \"**/__path__/*.ts\" -e \"node_modules/**\" -e \"tmp/**\"",
"lint": "npm-run-all -c lint-js lint-ts"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're running them sequentially, just do npm run foo bar and skip a dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried doing that, but it seems to just send the second one as an argument:

$ npm run lint-js lint-ts

> angular-cli@1.0.0-beta.11-webpack.2 lint-js D:\work\angular-cli
> eslint . "lint-ts"

@hansl
Copy link
Contributor

hansl commented Aug 24, 2016

2 nits. Also, travis fails the lint test.

@filipesilva
Copy link
Contributor Author

The lint errors I'll address tomorrow probably. There are a fair amount of them.

@filipesilva filipesilva force-pushed the lint-ts branch 3 times, most recently from 145d320 to 640a008 Compare August 25, 2016 01:46
@@ -49,7 +49,9 @@
true,
"ban-keywords",
"check-format",
"allow-trailing-underscore"
"allow-leading-underscore",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to allow one or the other, not both, but I'm fine with it for now (I know it's a big one).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, left allow-leading-underscore only.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, that's what Angular uses.

@hansl
Copy link
Contributor

hansl commented Aug 25, 2016

LGTM.

@hansl
Copy link
Contributor

hansl commented Aug 25, 2016

Please rebase and I'll merge when I can.

@filipesilva
Copy link
Contributor Author

Rebased and pushed. Have a quick review and check the linux CI before merging though, stuff might have been broken.

@hansl
Copy link
Contributor

hansl commented Aug 25, 2016

Still LGTM. I'll merge.

@hansl hansl merged commit d17bc71 into angular:master Aug 25, 2016
@filipesilva filipesilva deleted the lint-ts branch August 25, 2016 20:17
@catull catull mentioned this pull request Aug 25, 2016
hansl pushed a commit to hansl/angular-cli that referenced this pull request Aug 26, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants