1
我正在尝试使用eslint工作流程。我已经安装了通过NVM节点和全球的nessary插件:ESLint配置困境
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
和地方在我的项目:
"devDependencies": {
"eslint": "2.7.0",
"eslint-config-angular": "0.5.0",
"eslint-config-standard": "5.1.0",
"eslint-config-semistandard": "6.0.1",
"eslint-plugin-angular": "1.0.0",
"eslint-plugin-promise": "1.1.0",
"eslint-plugin-standard": "1.3.2"
},
而且我已经建立了一个.eslintrc.json
文件在我的项目的根:
{
"env": {
"browser": 1
},
"extends": "semistandard",
"plugins": [
"standard","angular"
],
"globals": {
"angular": 1,
"$": 1,
"angularDragula": 1
}
}
Atom ESlint和standard-formatter插件发现并尊重我的配置文件,但它不是命令行或Sublime Linter。它不读取配置,所以我得到标记错误:
,这使得它很明显它不是读书的设置。我在这里做错了什么?正如我所说的,它在Atom中工作,但不是命令行或Sublime(它使用命令行选项)。
你需要告诉它在哪里可以找到配置吗?它是否假定本地/项目目录或假定用户全局配置? –
我试过了两个,就像'eslint -c〜/ .eslintrc.json feedback-alerts.controller.js' – Steve
我对eslint并不熟悉,但那些错误怎么表明它不读你的配置?如果你删除你的配置文件并运行cli或者用'-c'使用空配置文件,你会得到什么? –