How do I configure ESLint to allow fat arrow class methods

前端 未结 6 1385
北恋
北恋 2020-12-01 06:59

ESLint is throwing a Parsing error: Unexpected token = error when I try to lint my Es6 classes. What configuration parameter am I missing to enable fat arrow c

6条回答
  •  日久生厌
    2020-12-01 07:47

    If you want to use experimental features (such as arrows as class methods) you need to use babel-eslint as a parser. Default parser (Espree) doesn't support experimental features.

提交回复
热议问题