Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

False positive for unused vars used as decorators of properties #536

Closed
@LucaPeng

Description

@LucaPeng

What version of TypeScript are you using?
3.1.4

What version of typescript-eslint-parser are you using?
20.1.0

What code were you trying to parse?

import {
  action,
  observable,
  useStrict,
  runInAction,
  IObservableArray,
} from 'mobx';
import orderReadService from '@client/model/purchase/orderReadService';
import {
  BizPurchaseOrderTO,
  PageTO,
  BizQueryOrderConditionTO,
} from '@client/types/thrift/purchase';
import { PURCHASE_ORDER_TYPE_ENUM } from '@constants/order';

useStrict(true);
export default class ListModalStore {
  // order list
  @observable
  orderList: IObservableArray<BizPurchaseOrderTO> = observable([]);
  @observable
  orderListPageInfo: PageTO = { currentPage: 1, perPage: 10, total: '5' };
}

What did you expect to happen?

no eslint error for the 'observable' which is imported from mobx.

What happened?

[eslint] 'observable' is defined but never used.

This is happened for the 'observable' which is imported from mobx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions