gund / eslint-plugin-deprecation

ESLint rule that reports usage of deprecated code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignores `@inheritDoc` declarations

mydea opened this issue · comments

I noticed this more or less accidentally - if you e.g. have code like this:

interface MyInterface {
  /**
   * This is old!
   * @deprecated Do not use this anymore.
   */
   oldProp?: string;
}

class MyClass implements MyInterface {
  /** @inheritDoc /*
  oldProp?: string;
}

const obj = new MyClass();
obj.oldProp = 'xx'; // does not raise an eslint error :(

Honestly I am not sure how easy it is to fix this, but got bitten by this quite a bit because I expected this to work 😅

Hey, did you try to remove the jsdoc from the class altogether and see if it works without @inheritDoc?