dotJEM / angular-routing

Enhanced state based routing for Angular applications!
https://dotjem.github.io/angular-routing/
MIT License
75 stars 9 forks source link

Evaluate TSLint #75

Closed jeme closed 10 years ago

jeme commented 11 years ago

23 added TSLint, but currently there are one rule disabled that I would like to run with "no-unreachable": false.

The reason for that is that it reports false positves, e.g. on code like:

        function clear(name?: string) {
            if (!trx.completed)
                return trx.clear(name);

            //Claims this is unreachable.
            if (isUndefined(name)) {
                forEach(views, (val, key) => {
                    $view.clear(key);
                });
            } else {
                delete views[name];
                raiseUpdated(name);
            }
            return $view;
        };

Need to investigate if forcing the use of {} on all if statements etc. even for one-liners... can make this rule run correctly... we can enforce this by adding the rule: "curly": false,

At the end of the day it's surely a bug in TSLint, and we have the test specs to prove that... (as the code above is actually tested);