0
내 루트 디렉토리에 eslint .
와 ESLINT를 사용하여이 오류로 실행하기 위해 노력하고있어 :YAMLException : 오류 : 라인 (45)에 중복 매핑 키, 열 (30) : "beforeLineComment"거짓,
YAMLException: Cannot read config file:
/mypath/node_modules/extend/.eslintrc Error:
duplicated mapping key at line 45, column 30: "beforeLineComment": false,
I 노드 v6.9.1이 eslint는 v3.12.1
입니다 이것은 내 .eslintrc.json
설정 파일입니다
{
"rules": {
"indent": [2, 2],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"no-underscore-dangle": 0,
"curly": 0,
"no-use-before-define": [2, "nofunc"],
"spaced-comment": [2, "always"],
"space-before-function-paren": [2, { "anonymous": "always", "named": "never" }],
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"no-var": 2,
"object-shorthand": [2, "always"],
"prefer-const": 2
},
"env": {
"es6": true,
"node": true,
"mocha": true
}
}
당신이 볼 수 있듯이 json을 사용하고 있지 않습니다. YAML 나는 그 오류가 왜 발생했는지 알지 못합니다.
해당 파일에는 45 줄도 없습니다. 당신은 확신합니까 ** 그것이 불평하는 파일입니까? – Pointy
''root ': true'가 지정되어 있지 않으면, eslint는'.eslintrc' 파일 [부모 디렉토리에있는 파일들]을 병합합니다 (http://eslint.org/docs/user-guide/configuring#configuration-cascading-and- 계층). 아마도이 병합에는 YAML 변환이 포함될 수 있으며 상위 디렉토리의'.eslintrc' 파일에 이상한 점이있을 수 있습니다. – cartant