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

Publish a 2nd recommended ruleset that contains *only* the contrib rules #309

Closed
dsifford opened this issue Nov 2, 2016 · 6 comments
Closed
Labels

Comments

@dsifford
Copy link
Contributor

dsifford commented Nov 2, 2016

Hello there,

I'm in a situation I'd like to be able to pull and use the bleeding edge code from the master branch (specifically, because in 2.0.13, still having no-duplicate-key set to true is breaking my build).

Would this be possible?

Thanks so much.

@dsifford
Copy link
Contributor Author

dsifford commented Nov 2, 2016

An alternative to this would be to strip out all rules not residing in this project from the tslint.json file.

Or, if you'd prefer to keep one living in this project for the project's own consumption, I suppose you could maintain two tslint.json files.

Users who "extends": ["tslint-microsoft-contrib"] may not be aware that by extending this project, they're also extending tslint proper.

@HamletDRC
Copy link
Member

@dsifford have you tried using our "releases" branch? It is the latest compiled code. Does that fix the issue

I'm not sure how having the source code in the /dist dir solves your problem.

(sorry, I thought I'd replied to this earlier).

@dsifford
Copy link
Contributor Author

dsifford commented Nov 27, 2016

@HamletDRC No worries.

No, the releases branch did not work for me. I'm using the nightly branch of tslint and that was not cooperating with the fact that if I extend your releases branch, I'd also be extending the no-duplicate-key rule from tslint proper (which is set in your tslint.json).

I think the main issue is that this repo creates a circumstance that results in an "extends cascade". In other words, if I extend this repo, I'm also extending all the repos that you extend (or, in this case, the rules from tslint proper that you have set in your tslint.json file).

The only way that this type of thing can be fixed is if lint rule repos (such as this one) maintains two tslint.json files. One for people to extend (which contains only rules specific to the current repo) and one that they themselves implement.

I ended up just removing the extends rule for this repo from my project for now until your tslint.json is free of the no-duplicate-key rule.

(I hope that makes sense. It's admittedly a bit confusing).

@HamletDRC
Copy link
Member

@dsifford so your problem would be solved if we published a 2nd tslint.json that only contained our rules, right?

@dsifford
Copy link
Contributor Author

Correct

@HamletDRC HamletDRC changed the title Consider adding dist directory with compiled TS in master Publish a 2nd recommended ruleset that contains *only* the contrib rules Feb 17, 2017
@JoshuaKGoldberg JoshuaKGoldberg added the Type: Task Miscellaneous work. label Jul 6, 2018
@JoshuaKGoldberg
Copy link

💀 It's time! 💀

TSLint is deprecated and no longer accepting pull requests other than security fixes. See #876. ☠️
We recommend you instead use typescript-eslint to lint your TypeScript code with ESLint. ✅

👋 It was a pleasure open sourcing with you!

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

No branches or pull requests

3 participants