[ESLint] Parsing error: Unexpected token =

有时遇到这种问题,程式码是对的,转写格式有错就会出现类似问题,可能会是Parsing error: Unexpected token <Parsing error: Unexpected token >

babel-eslint

"parser": "babel-eslint" is OK!

{    "parser": "babel-eslint",    "parserOptions": {        "ecmaVersion": 6,        "sourceType": "module",        "ecmaFeatures": {            "jsx": true,            "modules": true,            "experimentalObjectRestSpread": true        }    },    "plugins": [        "react"    ],    "extends": ["eslint:recommended", "plugin:react/recommended"],    "rules": {        "comma-dangle": 0,        "react/jsx-uses-vars": 1,        "react/display-name": 1,        "no-unused-vars": "warn",        "no-console": 1,        "no-unexpected-multiline": "warn"    },    "settings": {        "react": {            "pragma": "React",            "version": "15.6.1"        }    }}

关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章