-
Notifications
You must be signed in to change notification settings - Fork 197
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
BREAKING CHANGE: chore: sync with internal lint #75
Conversation
This synchronizes the lint rules to be closer to the lint rules used internally at Google. Not all rules are available externally, so this is not *exactly* the same. Also updated the TypeScript version to 2.6.1. A fair number of new lint rules are being applied now, which means that the code will be alot more consistent with other Google code, but it also means that users of gts may need to modify the source to pick up this release. For most of the new lint rules, a fixer is also available which should help with migration. TypeScript 2.6.x enables contravariant types for function parameters, which may also require some changes. See [1] for more info. [1] https://blogs.msdn.microsoft.com/typescript/2017/10/31/announcing-typescript-2-6/
Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
======================================
Coverage 99.6% 99.6%
======================================
Files 8 8
Lines 254 254
Branches 10 10
======================================
Hits 253 253
Misses 1 1
Continue to review full report at Codecov.
|
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
{"name": "Array", "message": "tsstyle#array-constructor"} | ||
], | ||
"ban-types": [true, | ||
["Object", "Use {} instead."], |
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.
What's the rationale for this rule? Just curious.
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.
+1, as a reader I prefer Object
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.
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.
tslint.json
Outdated
"ban-keywords", | ||
"allow-leading-underscore", | ||
"allow-trailing-underscore" | ||
] | ||
} | ||
} |
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.
Nit. newline?
This synchronizes the lint rules to be closer to the lint rules used
internally at Google. Not all rules are available externally, so this
is not exactly the same.
Also updated the TypeScript version to 2.6.1.
A fair number of new lint rules are being applied now, which means that
the code will be alot more consistent with other Google code, but it
also means that users of gts may need to modify the source to pick up
this release. For most of the new lint rules, a fixer is also available
which should help with migration.
TypeScript 2.6.x enables contravariant types for function parameters,
which may also require some changes. See [1] for more info.
[1] https://blogs.msdn.microsoft.com/typescript/2017/10/31/announcing-typescript-2-6/