-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
It uses the rules severity if there (if the project uses tslint@5), but defaults to warning, like before.
lib/main.js
Outdated
if (pkg.version.startsWith('3')) { | ||
// eslint-disable-next-line import/no-dynamic-require | ||
linter = shim(require('loophole').allowUnsafeNewFunction(() => require(linterPath))); | ||
} else if (pkg.version.startsWith('4')) { | ||
} else if (pkg.version.startsWith('4') || pkg.version.startsWith('5')) { |
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.
I feel that the else if
is redundant since we only hit this code if we are version 3, 4 or 5 and have an explicit if for the 3 case. It can safely be replaced with a simple else
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.
I agree, if a future v6 requires another change we can make this explicit again there.
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.
Thanks peeps, changed it to a simple else
. 👍
Please merge master into your topic branch and add a new iteration fixing the merge conflicts |
@Xapphire13 Thank you for doing this. I haven't come around to it sadly. 👏 |
No worries, I'm super keen to get TSLint 5 support =] |
It uses the rules severity if there (if the project uses tslint@5), but defaults to warning, like before.