import-js/eslint-plugin-import
View on GitHub`no-deprecated` works for `export function` but not for function exported by module
Open
#1,729 opened on Apr 14, 2020
enhancementhelp wanted
Repository metrics
- Stars
- (4,946 stars)
- PR merge metrics
- (Avg merge 138d 22h) (3 merged PRs in 30d)
Description
This will get picked up by the rule successfully:
/**
* @deprecated
* Use `generateApolloError` instead.
*/
export function getError(ex: any) {
if (ex.status && ex.code && ex.message) {
return generateApolloError(ex);
}
return ex;
}
This won't get picked up by the rule:
/**
* @deprecated
* Use `generateApolloError` instead.
*/
function getError(ex: any) {
if (ex.status && ex.code && ex.message) {
return generateApolloError(ex);
}
return ex;
}
export { getError }