import-js/eslint-plugin-import

`no-deprecated` works for `export function` but not for function exported by module

Open

#1,729 opened on 2020年4月14日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)JavaScript (1,540 forks)batch import
enhancementhelp wanted

Repository metrics

Stars
 (4,946 stars)
PR merge metrics
 (平均マージ 138d 22h) (30d で 3 merged PRs)

説明

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 }

コントリビューターガイド