Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add rule S1874 ('deprecation') for TS #1432

Closed
vilchik-elena opened this issue Sep 16, 2019 · 5 comments · Fixed by #1715
Closed

Add rule S1874 ('deprecation') for TS #1432

vilchik-elena opened this issue Sep 16, 2019 · 5 comments · Fixed by #1715
Assignees
Milestone

Comments

@vilchik-elena
Copy link
Contributor

vilchik-elena commented Sep 16, 2019

This is a tricky one, investigate rule implementation before applying it (does it work cross-file?)

@vilchik-elena vilchik-elena changed the title Add rule S1874 (based on import/no-deprecated Add rule S1874 (based on 'import/no-deprecated') for TS/JS (new rule for JS) Sep 16, 2019
@vilchik-elena vilchik-elena added this to the 6.0 milestone Sep 16, 2019
@vilchik-elena vilchik-elena self-assigned this Sep 16, 2019
@vilchik-elena vilchik-elena changed the title Add rule S1874 (based on 'import/no-deprecated') for TS/JS (new rule for JS) Add rule S1874 ('deprecation' in tslint) for TS Sep 17, 2019
@vilchik-elena
Copy link
Contributor Author

The problem is that import/no-deprecated is able to detect only trivial cases, when deprecated symbol is imported. Still it's not able to resolve deprecated method calls. So we should write our own rule relying on type-checker.
Later we can contribute this rule to typescript-plugin for eslint.

@vilchik-elena vilchik-elena removed their assignment Sep 17, 2019
@saberduck saberduck modified the milestones: 6.0, 6.1 Sep 30, 2019
@vilchik-elena vilchik-elena changed the title Add rule S1874 ('deprecation' in tslint) for TS Add rule S1874 ('deprecation') for TS Oct 25, 2019
@vilchik-elena vilchik-elena self-assigned this Oct 31, 2019
@webmaster128
Copy link

Nice work!

Later we can contribute this rule to typescript-plugin for eslint.

Would it be possible to port the rule to https://github.com/typescript-eslint/typescript-eslint? Or would the author and/or copyright holder give permission to directly port to to the BSD-2-Clause licensed typescript-eslint?

@gund
Copy link

gund commented Apr 15, 2020

@webmaster128 I've already asked that question in SonarSource/eslint-plugin-sonarjs#150 a while ago but it seems they are not so active in engaging with OS community here...

To address your question - I've already ported this rule into separate ESlint plugin under LGPL 3 license, so you may want to check that out =)

@snebjorn
Copy link

@vilchik-elena I'm also very interested in

Later we can contribute this rule to typescript-plugin for eslint.

@vilchik-elena
Copy link
Contributor Author

We will try to contribute the rule to typescript-eslint plugin

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
5 participants