-
Notifications
You must be signed in to change notification settings - Fork 184
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
Upgrade typescript-eslint #4452
Conversation
This is the current status of the ruling differences. @ilia-kebets-sonarsource @vdiez I would appreciate if you could help me with the review. I suggest we split by rules - each person takes one rule (both js and ts) |
Here are the suspect cases I encountered: S3863: Imports from the same module should be merged
S2201: Return values from functions without side effects should not be ignored
S4325: Redundant casts and non-null assertions should be avoided
if (typeof this.colDef.suppressNavigable === 'boolean') {
return <boolean> this.colDef.suppressNavigable; if (typeof this.colDef.editable === 'boolean') {
return <boolean> this.colDef.editable;
} else if (typeof colDef.checkboxSelection === 'boolean') {
this.usingWrapper = <boolean> colDef.checkboxSelection;
const categoriesResult = Object.keys(categories)
.map((key: CategoriesKeys) => {
// ...
<Category
key={category}
title={category as CategoriesKeys}
// ...
/> S3981: Collection size and array length comparisons should make sense
return value !== null
&& typeof value === 'object'
&& typeof value.length === 'number'
&& value.length >= 0 S2260: JS parser failure
|
Changes for S6582 come from the fact that @typescript-eslint provides |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
import { EncodedMessage } from 'eslint-plugin-sonarjs/lib/utils/locations'; | ||
import { isIdentifier } from 'eslint-plugin-sonarjs/lib/utils/nodes'; |
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.
is there a reason not to use the utils from SonarJS
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.
not really, we could
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!
No description provided.