palantir / tslint-playground

A playground for testing tslint configurations
https://palantir.github.io/tslint-playground/
Apache License 2.0
7 stars 5 forks source link

Support for external packages (extends) #6

Open jonaskello opened 6 years ago

jonaskello commented 6 years ago

This looks really promising, nice work!

I wonder if there is support for external packages or if it is planned? I tried a bit but it did not seem to be supported. Would love to test out tslint-immutable rules in the playground. This is the config I tried:

{
    "extends": ["tslint-immutable"],
    "rules": {
        "readonly-keyword": true,
    }
}
johnwiseheart commented 6 years ago

Thanks!

Currently it only supports the packages built into tslint - but I'd imagine it should be possible to integrate external packages in some way. I'd have to look into how tools like jsfiddle do this - I'd like to keep this browser-only rather then requiring a backing server so needs some investigation.

Another option here potentially is to look into integrating typescript compile errors and tslint linting into https://codesandbox.io/, but that feels both (a) more complex to implement and (b) more complex to use.

If anyone has any ideas how to do this let me know and I'd be happy to try and implement something.