question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use tslint.loadConfigurationFromPath() to load tslint.json

See original GitHub issue

https://github.com/panuhorsmalahti/gulp-tslint/blob/master/index.ts#L130 tslint.loadConfigurationFromPath() https://github.com/palantir/tslint/blob/master/src/tslint.ts#L32 will resolve rulesDirectory as well as handling extends (coming soon). I think this is the cause for #55

cc/ @JKillian

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
patsissonscommented, Apr 6, 2016

for a quick stop-gap until gulp-tslint is using findConfiguration internally, you can inject the config when piping.

import tslint from 'gulp-tslint'

gulp.task('lint:ts', () => {
  gulp
    .src('*.ts')
    .pipe(tslint({ configuration: require('tslint').findConfiguration() }))
    .pipe(tslint.report('verbose', { emitError: true, summarizeFailureOutput: true }));
});
// tslint.json
{
  "extends": "tslint/docs/sample.tslint",
  "rules": {
  }
}
0reactions
jkilliancommented, Apr 19, 2016

These are the changes I made to grunt-tslint so new features like extends work correctly: https://github.com/palantir/grunt-tslint/pull/47/files

I don’t know the gulp model very well / how it interacts with the filesystem, but perhaps something similar would be possible here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring TSLint - Palantir Open Source
When using the CLI or many third-party tools, a file named tslint.json or ... TSLint to try and load the main file of...
Read more >
How to use the tslint.Configuration function in tslint - Snyk
test/tsconfig.json"); // we need to load and override the configuration let config = tslint.Configuration.loadConfigurationFromPath("./tslint.json"); ...
Read more >
vscode-typescript-tslint-plugin/README.md at main - GitHub
This extension works using VS Code's built-in version of TypeScript and a local or global install of tslint. You do not need to...
Read more >
How can I use TSLint in VS Code? - Stack Overflow
On a new machine, I installed VS Code tslint extension before installing tslint ... The tslint.json file as shown when opened in VSCode...
Read more >
TSLint: Error applying code style rules from configuration file
Create new angular-cli template project using WSL2. image.png. /home/vladislav/projects/angucli/node_modules/tslint/lib/configuration.js:219 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found