microsoft / vscode-typescript-tslint-plugin

VS Code extension that provides TSLint support using the typescript-tslint-plugin
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin
MIT License
188 stars 34 forks source link

Feature Request: Select tslint config by file name #42

Closed tommck closed 5 years ago

tommck commented 5 years ago

So, in my applications, I typically have a tslint.json and a tslint.spec.json. We use the spec linting rules for unit tests and the other for everything else

Can we please have a way to configure this?

mjbvz commented 5 years ago

Check out the tslint.configFile setting

tommck commented 5 years ago

That allows you to set one config file. I want to use a different one based on the file name.

I don't see how this will help me

On Fri, Jan 18, 2019, 1:40 PM Matt Bierner <notifications@github.com wrote:

Closed #42 https://github.com/Microsoft/vscode-typescript-tslint-plugin/issues/42.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode-typescript-tslint-plugin/issues/42#event-2083650050, or mute the thread https://github.com/notifications/unsubscribe-auth/AA77xVIHFyai_17zEeNlGfPIWI6EnUABks5vEhUfgaJpZM4aIJne .

mjbvz commented 5 years ago

Then have you tried just creating separate tsconfig.json files: one under tests and one at the root for the rest?

tommck commented 5 years ago

Our tests live right next to the code. It's a very common pattern

Foo.ts Foo.spec.ts

On Fri, Jan 18, 2019, 2:59 PM Matt Bierner <notifications@github.com wrote:

Then have you tried just creating separate tsconfig.json files: one under tests and one at the root for the rest?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode-typescript-tslint-plugin/issues/42#issuecomment-455669769, or mute the thread https://github.com/notifications/unsubscribe-auth/AA77xYSGRvuUJUxCQaiEJtZH_X0muaFrks5vEieygaJpZM4aIJne .

villelahdenvuo commented 5 years ago

This is a very common use case I would say.

mbest commented 2 years ago

@mjbvz I'm running into this issue also. In our case, we have config for all files and another just for non-spec files. But with the extension, we can only see the linting error from the main config.

mjbvz commented 2 years ago

This extension (and TSLint itself) have been deprecated for multiple years now so this feature request will almost certainly never be implemented. I suggest migrating to eslint