Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

support tslint@5 #151

Merged
merged 3 commits into from
Apr 13, 2017
Merged

support tslint@5 #151

merged 3 commits into from
Apr 13, 2017

Conversation

despairblue
Copy link
Contributor

It uses the rules severity if there (if the project uses tslint@5), but defaults to warning, like before.

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')) {
Copy link
Contributor

@Xapphire13 Xapphire13 Apr 7, 2017

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

Copy link
Member

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.

Copy link
Contributor Author

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. 👍

@Xapphire13
Copy link
Contributor

Please merge master into your topic branch and add a new iteration fixing the merge conflicts

@Xapphire13 Xapphire13 merged commit 7ca08e1 into AtomLinter:master Apr 13, 2017
@despairblue
Copy link
Contributor Author

@Xapphire13 Thank you for doing this. I haven't come around to it sadly. 👏

@Xapphire13
Copy link
Contributor

No worries, I'm super keen to get TSLint 5 support =]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants