Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

tslint 4.0 support #313

Closed
Delagen opened this issue Nov 21, 2016 · 12 comments
Closed

tslint 4.0 support #313

Delagen opened this issue Nov 21, 2016 · 12 comments
Assignees
Milestone

Comments

@Delagen
Copy link

Delagen commented Nov 21, 2016

Error: Cannot find module 'tslint/lib/lint'
tslint-microsoft-contrib\functionNameRule.js:7:12)
@Delagen
Copy link
Author

Delagen commented Nov 21, 2016

var Lint= require('tslint/lib/lint');
Lint.Rules.AbstractRule

=>

var Rules = require('tslint/lib/rules');
Rules.AbstractRule

@bookman25
Copy link

bookman25 commented Nov 21, 2016

Should tslint be a peer or actual dependency instead of a dev dependency? I'm seeing runtime errors after updating tslint locally.

@HamletDRC
Copy link
Member

@bookman25 yes, we should be declaring TypeScript and TSLint versions as a peer dependency so that these types of runtime errors are caught by npm instead. That is a good idea.

@Delagen thanks for submitting this bug. I am going to try and fix this in a way that is still backwards compatible with older versions of tslint.

@HamletDRC HamletDRC modified the milestones: 2.0.14, 3.0.0 Nov 27, 2016
@HamletDRC
Copy link
Member

I think we're going to have to update all the rules and break backwards compatibility.

@jwbay
Copy link

jwbay commented Dec 1, 2016

Is there any reason not to make them explicit hard dependencies since they are required at runtime? npm stopped enforcing peer dependencies with version 3. It just prints a warning now. So if a consuming application upgrades their tslint version it could still break since this library will try to use it. This wouldn't happen with a normal dependency.

@HamletDRC
Copy link
Member

@jwbay @bookman25 @Delagen @ChrisMBarr @JoshuaKGoldberg @bondz

We are very close to releasing tslint-microsoft-contrib 4.0.0 which will support tslint 4.0.0

A few notes:

  • grunt-tslint does not support tslint 4.0.0. yet
  • tslint 4.0.0 requires typescript >= 2.0.0
  • I cannot test the new contrib package on my large codebase because I cannot upgrade to typescript 2.0.0
  • Currently we have a false positive in no-unnecessary-semicolon that needs fixing.

It would be a big help if anyone here can test our latest nightly. Just install with:

npm install git://github.com/Microsoft/tslint-microsoft-contrib.git#releases

or point your npm dependency to:

git://github.com/Microsoft/tslint-microsoft-contrib.git#releases

Please report any issues you find! Thanks!

(also, the WIP of 4.0.0 support is on the branch called "3_0_0". If you want to take a look at an issue be sure to fork off that branch.

@bookman25
Copy link

I just tested it out. We're only using a few rules but it's all working correctly now with 4.0. Thanks!

@schmuli
Copy link

schmuli commented Dec 6, 2016

@HamletDRC

Regarding using the #releases branch, can you please explain why this preferable to having published beta releases on NPM?

By the way, is there a planned release date already for the 3.x branch?

@HamletDRC
Copy link
Member

@schmuli I have the #releases branch set up because it is easier for me to just make a push to a branch than publish a beta to npm. I can look into it though.

There is no official release date of 3.x because we're blocked on grunt-tslint not supporting 4.0. We can see what we can do though.

@Delagen
Copy link
Author

Delagen commented Dec 8, 2016

Please publish NPM version. With beta or other tag to not override latest

@bencompton
Copy link

For the last couple of days, I have been using the latest changes on the release branch in a medium-large project that uses a fair amount of rules. So far, I haven't had any issues. I agree with the other posts that it would be great to see a beta release on NPM.

@HamletDRC HamletDRC self-assigned this Dec 12, 2016
@HamletDRC
Copy link
Member

Code merged to master. Starting the release process now.

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

No branches or pull requests

6 participants