Open taicho opened 7 years ago
From what I can gather by looking through the repo, don't provide a configuration property in the options for the loader. If you're using a tslint.json I don't think you need that property as you can specify new rules in the tslint.json. If you ommit the configuration property Lint.Linter.findConfiguration will be called which in turn calls loadConfigurationFromPath.
https://github.com/palantir/tslint/blob/master/src/configuration.ts#L93
I'll try it when i get home. I was having a similar issue, but was trying to call extends from webpack options configuration property. Which from the look of things is unsupported.
I had TS-Lint working a few weeks ago. At some point my project lost the ability to produce TS-Lint warnings, possibly due to a package upgrade. Is there a specific version of tslint that I can use to get linting working again. It looks like the PR to fix this issue has been around for some time.
All,
After struggling to understand to understand why tslint-loader would not honor the "extends" directive in my tslint.config it appears that I've been able to isolate the cause.
index.js
My version of tslint is 5.4.0 and I am using a tslint.json located at my root which looks like this:
Therefore the code will use Lint.Configuration.parseConfigFile to parse the config file. The problem is that in tslint (at least in 5.4.0) parseConfigFile does not traverse and resolve any of the rules provided via the "extends" option. I was able to fix this by using Lint.Configuration.loadConfigurationFromPath; the changed code looks like this:
Using the above fix everything appears to work properly. Also worth mentioning is that in the tslint codebase parseConfigFile is only use internally by loadConfigurationFromPath...
Three questions: