【发布时间】:2017-12-18 18:06:39
【问题描述】:
帮助在 create react app 中运行 eslint。
我用 tutorial 创建了 react 应用
然后我安装了
babel-eslint
standard
snazzy
然后我在 package.json 的下一行添加到脚本
"lint": "standart --verbose | snazzy"
现在我尝试使用命令运行 eslint:npm run lint
但我有一个错误Parsing error: Unexpected token = null
我的完整 package.json 在下面
{
"name": "square_app_react",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-scripts": "1.0.10"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"lint": "standart --verbose | snazzy"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
"standard": "^10.0.2"
}
}
请帮助了解如何修复它或如何在我的情况下更正运行 eslint。
提前谢谢你。
【问题讨论】:
标签: reactjs eslint create-react-app