ESLint Parsing error: Unexpected token

后端 未结 8 2040
野趣味
野趣味 2020-11-28 02:12

With this code:

import React from \'react\';
import { Link } from \'react-router\';
import { View, NavBar } from \'amazeui-touch\';

import * as Pages from \         


        
8条回答
  •  悲哀的现实
    2020-11-28 02:54

    In my case (im using Firebase Cloud Functions) i opened .eslintrc.json and changed:

    "parserOptions": {
      // Required for certain syntax usages
      "ecmaVersion": 2017
    },
    

    to:

    "parserOptions": {
      // Required for certain syntax usages
      "ecmaVersion": 2020
    },
    

提交回复
热议问题