[英]Eslint only working in one sublime text project?
I've duplicated a projects .eslintrc
and package.json
files, and only the first project gets linting. 我已经复制了一个项目
.eslintrc
和package.json
文件,并且只有第一个项目可以使用。 The second project doesn't show any errors. 第二个项目没有显示任何错误。
heres my package.json : 这是我的package.json:
{
"name": "Read-hapi",
"version": "1.0.0",
"description": "learning the hapi framework",
"repository": "https://github.com/Pushplaybang/learning-hapi.git",
"main": "server.js",
"dependencies": {
"blipp": "^2.3.0",
"boom": "^3.1.2",
"cheerio": "^0.20.0",
"good": "^6.6.0",
"good-console": "^5.3.1",
"handlebars": "^4.0.5",
"hapi": "^13.0.0",
"inert": "^3.2.0",
"joi": "^8.0.3",
"reading-time": "^1.0.2",
"request-promise": "^2.0.1",
"text-stats": "0.0.3",
"valid-url": "^1.0.9",
"vision": "^4.0.1"
},
"devDependencies": {
"babel-eslint": "^5.0.0",
"eslint": "^2.3.0",
"eslint-config-airbnb": "^6.1.0",
"eslint-plugin-react": "^4.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Paul van Zyl",
"license": "ISC"
}
and heres my .eslintrc 这是我的.eslintrc
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
},
"rules": {
"no-unused-vars": 0,
"no-undef": 0,
}
}
any help would be appreciated. 任何帮助,将不胜感激。
Try downgrading ESLint to ~2.2.0
in your package.json or using the default Espree parser instead of babel-eslint. 尝试降级ESLint至
~2.2.0
在您的package.json或使用默认Espree解析器,而不是通天-eslint的。 There's an incompatibility right now between ESLint 2.3.0 and babel-eslint. ESLint 2.3.0和babel-eslint之间现在不兼容。 We're tracking progress in eslint/eslint#5476 , and you can subscribe to that issue for updates.
我们正在eslint / eslint#5476中跟踪进度,您可以订阅该问题以进行更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.