gund / eslint-plugin-deprecation

ESLint rule that reports usage of deprecated code
GNU Lesser General Public License v3.0
329 stars 38 forks source link

Ignores `@inheritDoc` declarations #80

Open mydea opened 9 months ago

mydea commented 9 months ago

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 😅

gund commented 4 months ago

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