kratiahuja / broccoli-tslinter

Broccoli Plugin to run linter on typescript files. Uses tslint internally.
MIT License
9 stars 6 forks source link

`tslint:recommended` appears to not be working #9

Closed Turbo87 closed 7 years ago

Turbo87 commented 7 years ago

My tslint.json file is looking like this:

{
  "extends": "tslint:recommended"
}

and seems to be supported properly when I run it via command line (node_modules/.bin/tslint src/*.ts).


If I try to use the same file with broccoli-tslinter I'm seeing the following error:

The format of the config file is { rules: { /* rules list */ } }, where /* rules list */ is a key: value comma-seperated list of rulename: rule-options pairs.

If I change the file to:

{
  "extends": "tslint:recommended",
  "rules": {
  }
}

I'm now seeing:

Using tslint.json as the default file for linting rules
No rules defined for linting

but I don't see all the errors that I see when running directly from the command line.

Any clue what's going on here?

kratiahuja commented 7 years ago

Hmm nothing drops in from the top of my head. Will need dig deeper. Will look at it and let you know by EOD . Thanks for reporting @turbo87

kratiahuja commented 7 years ago

@Turbo87 : Found the issue. The core issue is that TSLint library lint API does not take into consideration extends yet. The extends API seems to be only implemented in tslint-cli per this PR. I will open an issue in the TSLint repo.

In the meanwhile I will also remove the extra checks for rules in this plugin since tslint checks for it now. However, until the issue in tslint is not fixed, you will not be able to use it via the broccoli plugin 😞 .

I will try to fix the issue in tslint repo but I won't be able to start looking at it until next weekend.

kratiahuja commented 7 years ago

Opened issue in tslint: https://github.com/palantir/tslint/issues/2011

Turbo87 commented 7 years ago

@kratiahuja awesome, thanks for taking care of this so quickly!

Turbo87 commented 7 years ago

fixed by https://github.com/kratiahuja/broccoli-tslinter/pull/12. thanks again!