【发布时间】:2019-12-25 05:23:36
【问题描述】:
今天,当我在 powershell 中运行 npx eslint --fix ./ 时,它会在 .eslintrc.json 中记录 Unexpected token } in JSON at position 93。所以我在这里完全有疑问:
1.'位置93'是什么意思以及如何在我的代码中找到确切的位置,因为我不知道93,我曾经在控制台记录错误位于哪一行(列)时找到位置。
2.我的.eslintrc.json好像没有语法错误,能帮我看看问题吗?
{
"env": {
"node": true,
"commonjs": true,
"es6": true,
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018
},
"plugins": [
"react"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"windows"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}
【问题讨论】:
-
是
"es6": true,后面的逗号 -
Json 文件不应有尾随逗号
标签: javascript json eslint