How do I configure ESLint to allow fat arrow class methods

前端 未结 6 1383
北恋
北恋 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:33

    First install babel-eslint:

    npm i -D babel-eslint
    

    Then add the following to your .eslintrc.json file:

    "parser": "babel-eslint"
    

提交回复
热议问题