-
Notifications
You must be signed in to change notification settings - Fork 887
Enable access to the LanguageService for rules #4232
Comments
@ajafff did exactly that with https://github.com/fimbullinter/wotan 😊 |
LanguageService access was removed in #2235 with the rationale of:
... but I think it would be nice to use TSLint's infrastructure to check & fix things with information only available through the LanguageService, as you suggest @donaldpipowitch. We should check with the TS team what the current stance is and what all the potential dangers are before proceeding. |
Access to the TS LanguageService would be great, for example to get all references of a node. Or is there any other way to obtain all references? |
Since it's not clear without reading other issues, recapping here: using a TS language service is necessary to re-enable the |
☠️ TSLint's time has come! ☠️ TSLint is no longer accepting most feature requests per #4534. See typescript-eslint.io for the new, shiny way to lint your TypeScript code with ESLint. ✨ It was a pleasure open sourcing with you all! |
🤖 Beep boop! 👉 TSLint is deprecated 👈 (#4534) and you should switch to typescript-eslint! 🤖 🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋 |
Feature request
Is your feature request that we implement a new rule?
No.
Is your feature request related to a problem? Please describe.
I'd like to access
SuggestionDiagnostics
in a rule. AFAIK there are only available via theLanguageService
(and not theProgram
) and it looks like support for/access to theLanguageService
was removed intslint@^5
. That way I could create a small wrapper around "unused variables" suggestion diagnostics, so I can still remove them via TSLint in a custom rule.Describe the solution you'd like
It would be nice to get access to the
LanguageService
in custom rules.Describe alternatives you've considered
Create my own lint framework which uses the
LanguageService
? 🤷♀️😂 I'd at least write a small standalone script which does everything I want, but TSLint would be a nicer place for this.The text was updated successfully, but these errors were encountered: