Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

feat(tslint): use extends instead of rulesDirectory #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

macklinu
Copy link

I misread the README and tried to use extends instead of rulesDirectory in tslint.json based on other TSLint config packages I use (tslint-config-prettier, tslint-microsoft-contrib, tslint-react). This commit changes custom-tslint-rules' configuration to use rulesDirectory internally, which then allows the user to add "custom-tslint-rules" to the extends property in tslint.json.

BREAKING CHANGE: this affects how users set up custom-tslint-rules, as they will need to change from rulesDirectory to extends in their own tslint.json confiigurations (as shown in the README), so I expect this to be a major breaking change (from 3.0.0 to 4.0.0).


No pressure in terms of merging this change (since this was born out of me not clearly reading the directions 馃槼), but I did want to open this to share feedback on the extends/rulesDirectory confusion I had (since I expect to use extends after installing custom tslint rule packages). And thank you for the import-barrels rule, planning to try it out on my team! 馃檪

running `yarn install` updated the `yarn.lock` file
I misread the README and tried to use extends instead of rulesDirectory in `tslint.json` based on
other tslint config packages I use (tslint-config-prettier, tslint-microsoft-contrib, tslint-react).
This commit changes custom-tslint-rules' configuration to use rulesDirectory internally, which then
allows the user to add "custom-tslint-rules" to the extends property in `tslint.json`.

https://palantir.github.io/tslint/2016/03/31/sharable-configurations-rules.html
https://github.com/palantir/tslint-react/blob/3.0.0/tslint-react.json#L2
https://github.com/alexjoverm/tslint-config-prettier#get-started
https://github.com/Microsoft/tslint-microsoft-contrib/blob/b720cd9827a13c2878d304193544a5b030953ecb/tslint.json#L3

BREAKING CHANGE: this affects how users set up custom-tslint-rules, as they will need to change from
rulesDirectory to extends in their own `tslint.json` confiigurations (as shown in the README), so I
expect this to be a major breaking change (from 3.0.0 to 4.0.0).
@coveralls
Copy link

coveralls commented Jul 20, 2017

Coverage Status

Coverage remained the same at 96.774% when pulling 38a7548 on macklinu:extends-configuration into fb8802d on BendingBender:master.

@BendingBender
Copy link
Owner

Very interesting, I'll take a look and release if it makes sense. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

3 participants