Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

False positive on deprecated interface, enum, and type definitions #4

Closed
ecraig12345 opened this issue May 15, 2020 · 3 comments · Fixed by #6
Closed

False positive on deprecated interface, enum, and type definitions #4

ecraig12345 opened this issue May 15, 2020 · 3 comments · Fixed by #6
Labels

Comments

@ecraig12345
Copy link
Contributor

The plugin currently is reporting errors at the spot where deprecated interfaces and enums (but not variables or classes) are defined, which seems wrong.

These cases incorrectly show errors at the line where the thing is defined:

/** @deprecated */
interface Thing {}
/** @deprecated */
enum Color {}
/** @deprecated */
type OtherString = string;

These cases behave correctly (no error at definition):

/** @deprecated */
const a = 1;
/** @deprecated */
let b = 2;
/** @deprecated */
var c = 3;
/** @deprecated */
class Thing2 {}
/** @deprecated */
function foo() {}
@gund
Copy link
Owner

gund commented May 16, 2020

Hi, thanks for reporting this issue.

As I already pointed out in another issue - I'm not the author of this plugin's code and neither spent any significant time to understand it yet.

So I would not be able to fix this issue any time soon.

However you are more then welcome to try to fix is if you have time and open a PR =)

@ecraig12345
Copy link
Contributor Author

Got it, thanks for clarifying. It's unfortunate that this doesn't have feature parity and isn't officially supported since typescript-eslint seems to have considered it "good enough" that they don't need to invest in properly supporting a deprecation rule like TSLint had. I'm trying to work on fixes for this and the other issue, but there's a pretty significant learning curve to understanding the ESTree API well enough to fix anything.

@gund
Copy link
Owner

gund commented Jun 3, 2020

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gund gund added the released label Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants